When promoting the result of fp_to_uint/fp_to_sint,
[oota-llvm.git] / lib / CodeGen / MachineBasicBlock.cpp
index 5cfeeb63a756af8e8989f5d9cdbff577b0eaf6e2..db55a88eddc28722494abb2cb4ad470ebbd54d3b 100644 (file)
@@ -254,6 +254,11 @@ bool MachineBasicBlock::isSuccessor(MachineBasicBlock *MBB) const {
   return I != Successors.end();
 }
 
+bool MachineBasicBlock::isLayoutSuccessor(MachineBasicBlock *MBB) const {
+  MachineFunction::const_iterator I(this);
+  return next(I) == MachineFunction::const_iterator(MBB);
+}
+
 /// removeFromParent - This method unlinks 'this' from the containing function,
 /// and returns it, but does not delete it.
 MachineBasicBlock *MachineBasicBlock::removeFromParent() {
@@ -285,7 +290,8 @@ void MachineBasicBlock::ReplaceUsesOfBlockWith(MachineBasicBlock *Old,
     // Scan the operands of this machine instruction, replacing any uses of Old
     // with New.
     for (unsigned i = 0, e = I->getNumOperands(); i != e; ++i)
-      if (I->getOperand(i).isMBB() && I->getOperand(i).getMBB() == Old)
+      if (I->getOperand(i).isMBB() &&
+          I->getOperand(i).getMBB() == Old)
         I->getOperand(i).setMBB(New);
   }