diff options
author | David Blaikie <dblaikie@gmail.com> | 2014-11-19 07:49:26 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2014-11-19 07:49:26 +0000 |
commit | 70573dcd9f002307584b63033e6e017474e11b0c (patch) | |
tree | 0c227393f46738f668ebe94ec0b0c4132b661b55 /llvm/lib/CodeGen/MachineInstrBundle.cpp | |
parent | 2aa06a989dfef2950ab45da80dd9c1adadd9f9a2 (diff) | |
download | bcm5719-llvm-70573dcd9f002307584b63033e6e017474e11b0c.tar.gz bcm5719-llvm-70573dcd9f002307584b63033e6e017474e11b0c.zip |
Update SetVector to rely on the underlying set's insert to return a pair<iterator, bool>
This is to be consistent with StringSet and ultimately with the standard
library's associative container insert function.
This lead to updating SmallSet::insert to return pair<iterator, bool>,
and then to update SmallPtrSet::insert to return pair<iterator, bool>,
and then to update all the existing users of those functions...
llvm-svn: 222334
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstrBundle.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineInstrBundle.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/MachineInstrBundle.cpp b/llvm/lib/CodeGen/MachineInstrBundle.cpp index 6bea49deb01..0690f08d495 100644 --- a/llvm/lib/CodeGen/MachineInstrBundle.cpp +++ b/llvm/lib/CodeGen/MachineInstrBundle.cpp @@ -141,7 +141,7 @@ void llvm::finalizeBundle(MachineBasicBlock &MBB, // Internal def is now killed. KilledDefSet.insert(Reg); } else { - if (ExternUseSet.insert(Reg)) { + if (ExternUseSet.insert(Reg).second) { ExternUses.push_back(Reg); if (MO.isUndef()) UndefUseSet.insert(Reg); @@ -158,7 +158,7 @@ void llvm::finalizeBundle(MachineBasicBlock &MBB, if (!Reg) continue; - if (LocalDefSet.insert(Reg)) { + if (LocalDefSet.insert(Reg).second) { LocalDefs.push_back(Reg); if (MO.isDead()) { DeadDefSet.insert(Reg); @@ -174,7 +174,7 @@ void llvm::finalizeBundle(MachineBasicBlock &MBB, if (!MO.isDead()) { for (MCSubRegIterator SubRegs(Reg, TRI); SubRegs.isValid(); ++SubRegs) { unsigned SubReg = *SubRegs; - if (LocalDefSet.insert(SubReg)) + if (LocalDefSet.insert(SubReg).second) LocalDefs.push_back(SubReg); } } @@ -186,7 +186,7 @@ void llvm::finalizeBundle(MachineBasicBlock &MBB, SmallSet<unsigned, 32> Added; for (unsigned i = 0, e = LocalDefs.size(); i != e; ++i) { unsigned Reg = LocalDefs[i]; - if (Added.insert(Reg)) { + if (Added.insert(Reg).second) { // If it's not live beyond end of the bundle, mark it dead. bool isDead = DeadDefSet.count(Reg) || KilledDefSet.count(Reg); MIB.addReg(Reg, getDefRegState(true) | getDeadRegState(isDead) | |