[llvm-commits] CVS: llvm/lib/CodeGen/BranchFolding.cpp
Chris Lattner
sabre at nondot.org
Sat Nov 18 14:25:54 PST 2006
Changes in directory llvm/lib/CodeGen:
BranchFolding.cpp updated: 1.36 -> 1.37
---
Log message:
Don't transform in another bad case: if the block is empty, it should be
simplified before we do this xform so that our cost model is accurate.
---
Diffs of the changes: (+2 -1)
BranchFolding.cpp | 3 ++-
1 files changed, 2 insertions(+), 1 deletion(-)
Index: llvm/lib/CodeGen/BranchFolding.cpp
diff -u llvm/lib/CodeGen/BranchFolding.cpp:1.36 llvm/lib/CodeGen/BranchFolding.cpp:1.37
--- llvm/lib/CodeGen/BranchFolding.cpp:1.36 Sat Nov 18 15:56:39 2006
+++ llvm/lib/CodeGen/BranchFolding.cpp Sat Nov 18 16:25:39 2006
@@ -729,7 +729,8 @@
//
// In this case, we could actually be moving the return block *into* a
// loop!
- if (DoTransform && !MBB->succ_empty() && !CanFallThrough(PriorTBB))
+ if (DoTransform && !MBB->succ_empty() &&
+ (!CanFallThrough(PriorTBB) || PriorTBB->empty()))
DoTransform = false;
More information about the llvm-commits
mailing list