[llvm] r347215 - [LoopPass] fixing 'Modification' messages in -debug-pass=Executions for loop passes
Fedor Sergeev via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 19 07:11:00 PST 2018
Author: fedor.sergeev
Date: Mon Nov 19 07:10:59 2018
New Revision: 347215
URL: http://llvm.org/viewvc/llvm-project?rev=347215&view=rev
Log:
[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.
Modified:
llvm/trunk/lib/Analysis/LoopPass.cpp
Modified: llvm/trunk/lib/Analysis/LoopPass.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LoopPass.cpp?rev=347215&r1=347214&r2=347215&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/LoopPass.cpp (original)
+++ llvm/trunk/lib/Analysis/LoopPass.cpp Mon Nov 19 07:10:59 2018
@@ -216,10 +216,12 @@ bool LPPassManager::runOnFunction(Functi
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(Functi
}
}
- if (Changed)
+ if (LocalChanged)
dumpPassInfo(P, MODIFICATION_MSG, ON_LOOP_MSG,
CurrentLoopDeleted ? "<deleted loop>"
: CurrentLoop->getName());
More information about the llvm-commits
mailing list