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 | 3e58393c3de7cfdd218d3a3c2c350e138eb57c1b (patch) | |
tree | 3f5f68f682f0ff48407b95dabb30f5e5996481de /llvm/lib/CodeGen/MachineBasicBlock.cpp | |
parent | 8d91686b0d5eeaae501e69d3d95052cbb12aad66 (diff) | |
download | bcm5719-llvm-3e58393c3de7cfdd218d3a3c2c350e138eb57c1b.tar.gz bcm5719-llvm-3e58393c3de7cfdd218d3a3c2c350e138eb57c1b.zip |
Added addition atomic instrinsics and, or, xor, min, and max.
llvm-svn: 50663
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineBasicBlock.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineBasicBlock.cpp b/llvm/lib/CodeGen/MachineBasicBlock.cpp index 58ca6efcfe2..01aaba5282b 100644 --- a/llvm/lib/CodeGen/MachineBasicBlock.cpp +++ b/llvm/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); |