diff options
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 3629ae90da5..4c1bd7ab08e 100644 --- a/llvm/lib/Analysis/LoopPass.cpp +++ b/llvm/lib/Analysis/LoopPass.cpp @@ -195,10 +195,11 @@ bool LPPassManager::runOnFunction(Function &F) { // Walk Loops unsigned InstrCount, FunctionSize = 0; + StringMap<std::pair<unsigned, unsigned>> FunctionToInstrCount; bool EmitICRemark = M.shouldEmitInstrCountChangedRemark(); // Collect the initial size of the module and the function we're looking at. if (EmitICRemark) { - InstrCount = initSizeRemarkInfo(M); + InstrCount = initSizeRemarkInfo(M, FunctionToInstrCount); FunctionSize = F.getInstructionCount(); } while (!LQ.empty()) { @@ -226,7 +227,8 @@ bool LPPassManager::runOnFunction(Function &F) { if (NewSize != FunctionSize) { int64_t Delta = static_cast<int64_t>(NewSize) - static_cast<int64_t>(FunctionSize); - emitInstrCountChangedRemark(P, M, Delta, InstrCount, &F); + emitInstrCountChangedRemark(P, M, Delta, InstrCount, + FunctionToInstrCount, &F); InstrCount = static_cast<int64_t>(InstrCount) + Delta; FunctionSize = NewSize; } |