Changes in directory llvm/lib/CodeGen:

IfConversion.cpp updated: 1.14 -> 1.15
---
Log message:

Don't merge in tail block of a diamond if it has more than one predecessors 
after if-conversion.

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

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


Index: llvm/lib/CodeGen/IfConversion.cpp
diff -u llvm/lib/CodeGen/IfConversion.cpp:1.14 
llvm/lib/CodeGen/IfConversion.cpp:1.15
--- llvm/lib/CodeGen/IfConversion.cpp:1.14      Tue May 29 17:31:16 2007
+++ llvm/lib/CodeGen/IfConversion.cpp   Tue May 29 18:37:20 2007
@@ -555,9 +555,11 @@
   } else
     InsertUncondBranch(BBI.BB, CvtBBI->BB, TII);
 
-  // If the if-converted block fallthrough into the tail block, then
+  // If the if-converted block fallthrough or unconditionally branch into the
+  // tail block, and the tail block does not have other predecessors, then
   // fold the tail block in as well.
-  if (BBI.TailBB && CvtBBI->BB->succ_size() == 1) {
+  if (BBI.TailBB &&
+      BBI.TailBB->succ_size() == 1 && CvtBBI->BB->succ_size() == 1) {
     CvtBBI->NonPredSize -= TII->RemoveBranch(*CvtBBI->BB);
     BBInfo TailBBI = BBAnalysis[BBI.TailBB->getNumber()];
     MergeBlocks(*CvtBBI, TailBBI);



_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to