summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/LoopPass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Analysis/LoopPass.cpp')
-rw-r--r--llvm/lib/Analysis/LoopPass.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/LoopPass.cpp b/llvm/lib/Analysis/LoopPass.cpp
index c5ced03cfa8..07a151ce0fc 100644
--- a/llvm/lib/Analysis/LoopPass.cpp
+++ b/llvm/lib/Analysis/LoopPass.cpp
@@ -193,6 +193,8 @@ bool LPPassManager::runOnFunction(Function &F) {
}
// Walk Loops
+ unsigned InstrCount = 0;
+ bool EmitICRemark = M.shouldEmitInstrCountChangedRemark();
while (!LQ.empty()) {
CurrentLoopDeleted = false;
CurrentLoop = LQ.back();
@@ -210,9 +212,11 @@ bool LPPassManager::runOnFunction(Function &F) {
{
PassManagerPrettyStackEntry X(P, *CurrentLoop->getHeader());
TimeRegion PassTimer(getPassTimer(P));
- unsigned InstrCount = initSizeRemarkInfo(M);
+ if (EmitICRemark)
+ InstrCount = initSizeRemarkInfo(M);
Changed |= P->runOnLoop(CurrentLoop, *this);
- emitInstrCountChangedRemark(P, M, InstrCount);
+ if (EmitICRemark)
+ emitInstrCountChangedRemark(P, M, InstrCount);
}
if (Changed)
OpenPOWER on IntegriCloud