[llvm-commits] [llvm] r158007 - /llvm/trunk/lib/Transforms/Utils/LoopUnroll.cpp
Andrew Trick
atrick at apple.com
Tue Jun 5 10:51:05 PDT 2012
Author: atrick
Date: Tue Jun 5 12:51:05 2012
New Revision: 158007
URL: http://llvm.org/viewvc/llvm-project?rev=158007&view=rev
Log:
LoopUnroll: always check for NULL LoopPassManager
Modified:
llvm/trunk/lib/Transforms/Utils/LoopUnroll.cpp
Modified: llvm/trunk/lib/Transforms/Utils/LoopUnroll.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/LoopUnroll.cpp?rev=158007&r1=158006&r2=158007&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/LoopUnroll.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/LoopUnroll.cpp Tue Jun 5 12:51:05 2012
@@ -95,9 +95,11 @@
// 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();
More information about the llvm-commits
mailing list