diff options
author | Fedor Sergeev <fedor.sergeev@azul.com> | 2018-11-19 15:10:59 +0000 |
---|---|---|
committer | Fedor Sergeev <fedor.sergeev@azul.com> | 2018-11-19 15:10:59 +0000 |
commit | 3a3d688cc872a1317f8c7780bf6243b1cfa85ddf (patch) | |
tree | 721c87043ac2d0118a9a1a50bedacae113b0a80f /llvm/lib/Analysis/LoopPass.cpp | |
parent | 8f7f586e530fe2211064768ba78925e1a900b330 (diff) | |
download | bcm5719-llvm-3a3d688cc872a1317f8c7780bf6243b1cfa85ddf.tar.gz bcm5719-llvm-3a3d688cc872a1317f8c7780bf6243b1cfa85ddf.zip |
[LoopPass] fixing 'Modification' messages in -debug-pass=Executions for loop passes
Legacy loop pass manager is issuing "Made Modification" message after each Loop Pass
run, however condition for issuing it is accumulated among all the runs.
That leads to confusing 'modification' messages as soon as the first modification is done.
Changing condition to be "current pass made modifications", similar to how
it is being done in all other pass managers.
llvm-svn: 347215
Diffstat (limited to 'llvm/lib/Analysis/LoopPass.cpp')
-rw-r--r-- | llvm/lib/Analysis/LoopPass.cpp | 6 |
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()); |