summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineBasicBlock.cpp
diff options
context:
space:
mode:
authorMon P Wang <wangmp@apple.com>2008-05-05 19:05:59 +0000
committerMon P Wang <wangmp@apple.com>2008-05-05 19:05:59 +0000
commit3e58393c3de7cfdd218d3a3c2c350e138eb57c1b (patch)
tree3f5f68f682f0ff48407b95dabb30f5e5996481de /llvm/lib/CodeGen/MachineBasicBlock.cpp
parent8d91686b0d5eeaae501e69d3d95052cbb12aad66 (diff)
downloadbcm5719-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.cpp13
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);
OpenPOWER on IntegriCloud