mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-09 13:33:17 +00:00
LoopUnroll: always check for NULL LoopPassManager
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158007 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9a314da581
commit
1247376856
@ -95,9 +95,11 @@ static BasicBlock *FoldBlockIntoPredecessor(BasicBlock *BB, LoopInfo* LI,
|
||||
// Erase basic block from the function...
|
||||
|
||||
// ScalarEvolution holds references to loop exit blocks.
|
||||
if (ScalarEvolution *SE = LPM->getAnalysisIfAvailable<ScalarEvolution>()) {
|
||||
if (Loop *L = LI->getLoopFor(BB))
|
||||
SE->forgetLoop(L);
|
||||
if (LPM) {
|
||||
if (ScalarEvolution *SE = LPM->getAnalysisIfAvailable<ScalarEvolution>()) {
|
||||
if (Loop *L = LI->getLoopFor(BB))
|
||||
SE->forgetLoop(L);
|
||||
}
|
||||
}
|
||||
LI->removeBlock(BB);
|
||||
BB->eraseFromParent();
|
||||
|
Loading…
x
Reference in New Issue
Block a user