[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnroll.cpp
Owen Anderson
resistor at mac.com
Tue Jul 18 22:45:37 PDT 2006
Changes in directory llvm/lib/Transforms/Scalar:
LoopUnroll.cpp updated: 1.20 -> 1.21
---
Log message:
Make LoopUnroll not die on LCSSA Phis. This makes lencod work again.
---
Diffs of the changes: (+6 -0)
LoopUnroll.cpp | 6 ++++++
1 files changed, 6 insertions(+)
Index: llvm/lib/Transforms/Scalar/LoopUnroll.cpp
diff -u llvm/lib/Transforms/Scalar/LoopUnroll.cpp:1.20 llvm/lib/Transforms/Scalar/LoopUnroll.cpp:1.21
--- llvm/lib/Transforms/Scalar/LoopUnroll.cpp:1.20 Wed Jun 7 16:24:10 2006
+++ llvm/lib/Transforms/Scalar/LoopUnroll.cpp Wed Jul 19 00:45:14 2006
@@ -269,6 +269,12 @@
// FIXME: Should update dominator analyses
+ // Remove LCSSA Phis from the exit block
+ for (BasicBlock::iterator ExitInstr = LoopExit->begin();
+ PHINode* PN = dyn_cast<PHINode>(ExitInstr); ++ExitInstr) {
+ PN->replaceAllUsesWith(PN->getOperand(0));
+ PN->eraseFromParent();
+ }
// Now that everything is up-to-date that will be, we fold the loop block into
// the preheader and exit block, updating our analyses as we go.
More information about the llvm-commits
mailing list