diff options
author | Mon P Wang <wangmp@apple.com> | 2008-05-05 19:05:59 +0000 |
---|---|---|
committer | Mon P Wang <wangmp@apple.com> | 2008-05-05 19:05:59 +0000 |
commit | 63307c335aa08b0d6a75f81d64d79af7e90eb78b (patch) | |
tree | da7531194465dc141c0d26ff68d1989c462b2c89 /lib/CodeGen/MachineBasicBlock.cpp | |
parent | 94bbdc8c254e259eff22eb5d6a1012fc1438fb45 (diff) |
Added addition atomic instrinsics and, or, xor, min, and max.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50663 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineBasicBlock.cpp')
-rw-r--r-- | lib/CodeGen/MachineBasicBlock.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/CodeGen/MachineBasicBlock.cpp b/lib/CodeGen/MachineBasicBlock.cpp index 58ca6efcfe..01aaba5282 100644 --- a/lib/CodeGen/MachineBasicBlock.cpp +++ b/lib/CodeGen/MachineBasicBlock.cpp @@ -252,6 +252,19 @@ void MachineBasicBlock::removePredecessor(MachineBasicBlock *pred) { Predecessors.erase(I); } +void MachineBasicBlock::transferSuccessors(MachineBasicBlock *fromMBB) +{ + if (this == fromMBB) + return; + + for(MachineBasicBlock::succ_iterator iter = fromMBB->succ_begin(), + end = fromMBB->succ_end(); iter != end; ++iter) { + addSuccessor(*iter); + } + while(!fromMBB->succ_empty()) + fromMBB->removeSuccessor(fromMBB->succ_begin()); +} + bool MachineBasicBlock::isSuccessor(MachineBasicBlock *MBB) const { std::vector<MachineBasicBlock *>::const_iterator I = std::find(Successors.begin(), Successors.end(), MBB); |