mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-09 13:33:17 +00:00
Make LoopUnroll not die on LCSSA Phis. This makes lencod work again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29198 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
db5b9cfd86
commit
2698a08c23
@ -269,6 +269,12 @@ bool LoopUnroll::visitLoop(Loop *L) {
|
||||
|
||||
// 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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user