Index: lib/Target/AArch64/AArch64A57FPLoadBalancing.cpp =================================================================== --- lib/Target/AArch64/AArch64A57FPLoadBalancing.cpp +++ lib/Target/AArch64/AArch64A57FPLoadBalancing.cpp @@ -137,7 +137,7 @@ int scavengeRegister(Chain *G, Color C, MachineBasicBlock &MBB); void scanInstruction(MachineInstr *MI, unsigned Idx, std::map &Active, - std::set> &AllChains); + std::vector> &AllChains); void maybeKillChain(MachineOperand &MO, unsigned Idx, std::map &RegChains); Color getColor(unsigned Register); @@ -320,7 +320,7 @@ // been killed yet. This is keyed by register - all chains can only have one // "link" register between each inst in the chain. std::map ActiveChains; - std::set> AllChains; + std::vector> AllChains; unsigned Idx = 0; for (auto &MI : MBB) scanInstruction(&MI, Idx++, ActiveChains, AllChains); @@ -583,7 +583,7 @@ void AArch64A57FPLoadBalancing:: scanInstruction(MachineInstr *MI, unsigned Idx, std::map &ActiveChains, - std::set> &AllChains) { + std::vector> &AllChains) { // Inspect "MI", updating ActiveChains and AllChains. if (isMul(MI)) { @@ -602,7 +602,7 @@ auto G = llvm::make_unique(MI, Idx, getColor(DestReg)); ActiveChains[DestReg] = G.get(); - AllChains.insert(std::move(G)); + AllChains.push_back(std::move(G)); } else if (isMla(MI)) { @@ -646,7 +646,7 @@ << TRI->getName(DestReg) << "\n"); auto G = llvm::make_unique(MI, Idx, getColor(DestReg)); ActiveChains[DestReg] = G.get(); - AllChains.insert(std::move(G)); + AllChains.push_back(std::move(G)); } else {