summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/Analysis/LoopPass.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/LoopPass.cpp b/llvm/lib/Analysis/LoopPass.cpp
index 4c1bd7ab08e..a68f114b83a 100644
--- a/llvm/lib/Analysis/LoopPass.cpp
+++ b/llvm/lib/Analysis/LoopPass.cpp
@@ -216,10 +216,12 @@ bool LPPassManager::runOnFunction(Function &F) {
initializeAnalysisImpl(P);
+ bool LocalChanged = false;
{
PassManagerPrettyStackEntry X(P, *CurrentLoop->getHeader());
TimeRegion PassTimer(getPassTimer(P));
- Changed |= P->runOnLoop(CurrentLoop, *this);
+ LocalChanged = P->runOnLoop(CurrentLoop, *this);
+ Changed |= LocalChanged;
if (EmitICRemark) {
unsigned NewSize = F.getInstructionCount();
// Update the size of the function, emit a remark, and update the
@@ -235,7 +237,7 @@ bool LPPassManager::runOnFunction(Function &F) {
}
}
- if (Changed)
+ if (LocalChanged)
dumpPassInfo(P, MODIFICATION_MSG, ON_LOOP_MSG,
CurrentLoopDeleted ? "<deleted loop>"
: CurrentLoop->getName());
OpenPOWER on IntegriCloud