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

Evan Cheng evan.cheng at apple.com
Thu Jun 7 15:31:50 PDT 2007



Changes in directory llvm/lib/CodeGen:

IfConversion.cpp updated: 1.36 -> 1.37
---
Log message:

Only remove the edge from entry to false if false block is merged.

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

 IfConversion.cpp |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Index: llvm/lib/CodeGen/IfConversion.cpp
diff -u llvm/lib/CodeGen/IfConversion.cpp:1.36 llvm/lib/CodeGen/IfConversion.cpp:1.37
--- llvm/lib/CodeGen/IfConversion.cpp:1.36	Thu Jun  7 03:13:00 2007
+++ llvm/lib/CodeGen/IfConversion.cpp	Thu Jun  7 17:31:28 2007
@@ -647,8 +647,8 @@
   // Now merge the entry of the triangle with the true block.
   BBI.NonPredSize -= TII->RemoveBranch(*BBI.BB);
   MergeBlocks(BBI, TrueBBI);
-  // Remove entry to false edge.
-  if (BBI.BB->isSuccessor(FalseBBI.BB))
+  // Remove entry to false edge if false block is merged in as well.
+  if (FalseBBDead && BBI.BB->isSuccessor(FalseBBI.BB))
     BBI.BB->removeSuccessor(FalseBBI.BB);
   std::copy(BBI.BrCond.begin(), BBI.BrCond.end(),
             std::back_inserter(BBI.Predicate));






More information about the llvm-commits mailing list