[llvm-commits] CVS: llvm/lib/CodeGen/BranchFolding.cpp

Alkis Evlogimenos alkis at cs.uiuc.edu
Sat Jul 31 08:04:02 PDT 2004



Changes in directory llvm/lib/CodeGen:

BranchFolding.cpp updated: 1.1 -> 1.2

---
Log message:

Use MachineFunction::iterator instead of a MachineBasicBlock* because
FallThrough maybe == to MF.end().


---
Diffs of the changes:  (+3 -2)

Index: llvm/lib/CodeGen/BranchFolding.cpp
diff -u llvm/lib/CodeGen/BranchFolding.cpp:1.1 llvm/lib/CodeGen/BranchFolding.cpp:1.2
--- llvm/lib/CodeGen/BranchFolding.cpp:1.1	Sat Jul 31 05:01:27 2004
+++ llvm/lib/CodeGen/BranchFolding.cpp	Sat Jul 31 10:03:52 2004
@@ -172,8 +172,9 @@
     MachineInstr *UncondBr = MI;
     MachineFunction::iterator FallThrough = MBB; ++FallThrough;
 
-    MachineBasicBlock *UncondDest = MI->getOperand(0).getMachineBasicBlock();
-    if (UncondDest == &*FallThrough) {
+    MachineFunction::iterator UncondDest =
+      MI->getOperand(0).getMachineBasicBlock();
+    if (UncondDest == FallThrough) {
       // Just delete the branch.  This does not effect the CFG.
       MBB->erase(UncondBr);
       return true;





More information about the llvm-commits mailing list