unique_ptrs are unique already, no need to unique them any further.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232178 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Benjamin Kramer 2015-03-13 16:59:29 +00:00
parent 462f98dd60
commit 9cc8166101

View File

@ -142,7 +142,7 @@ private:
int scavengeRegister(Chain *G, Color C, MachineBasicBlock &MBB);
void scanInstruction(MachineInstr *MI, unsigned Idx,
std::map<unsigned, Chain*> &Active,
std::set<std::unique_ptr<Chain>> &AllChains);
std::vector<std::unique_ptr<Chain>> &AllChains);
void maybeKillChain(MachineOperand &MO, unsigned Idx,
std::map<unsigned, Chain*> &RegChains);
Color getColor(unsigned Register);
@ -336,7 +336,7 @@ bool AArch64A57FPLoadBalancing::runOnBasicBlock(MachineBasicBlock &MBB) {
// been killed yet. This is keyed by register - all chains can only have one
// "link" register between each inst in the chain.
std::map<unsigned, Chain*> ActiveChains;
std::set<std::unique_ptr<Chain>> AllChains;
std::vector<std::unique_ptr<Chain>> AllChains;
unsigned Idx = 0;
for (auto &MI : MBB)
scanInstruction(&MI, Idx++, ActiveChains, AllChains);
@ -603,10 +603,9 @@ bool AArch64A57FPLoadBalancing::colorChain(Chain *G, Color C,
return Changed;
}
void AArch64A57FPLoadBalancing::
scanInstruction(MachineInstr *MI, unsigned Idx,
std::map<unsigned, Chain*> &ActiveChains,
std::set<std::unique_ptr<Chain>> &AllChains) {
void AArch64A57FPLoadBalancing::scanInstruction(
MachineInstr *MI, unsigned Idx, std::map<unsigned, Chain *> &ActiveChains,
std::vector<std::unique_ptr<Chain>> &AllChains) {
// Inspect "MI", updating ActiveChains and AllChains.
if (isMul(MI)) {
@ -625,7 +624,7 @@ scanInstruction(MachineInstr *MI, unsigned Idx,
auto G = llvm::make_unique<Chain>(MI, Idx, getColor(DestReg));
ActiveChains[DestReg] = G.get();
AllChains.insert(std::move(G));
AllChains.push_back(std::move(G));
} else if (isMla(MI)) {
@ -669,7 +668,7 @@ scanInstruction(MachineInstr *MI, unsigned Idx,
<< TRI->getName(DestReg) << "\n");
auto G = llvm::make_unique<Chain>(MI, Idx, getColor(DestReg));
ActiveChains[DestReg] = G.get();
AllChains.insert(std::move(G));
AllChains.push_back(std::move(G));
} else {