diff options
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r-- | llvm/lib/Analysis/CallGraphSCCPass.cpp | 8 | ||||
-rw-r--r-- | llvm/lib/Analysis/LoopPass.cpp | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Analysis/CallGraphSCCPass.cpp b/llvm/lib/Analysis/CallGraphSCCPass.cpp index d090b5afd2e..24dbda05f4b 100644 --- a/llvm/lib/Analysis/CallGraphSCCPass.cpp +++ b/llvm/lib/Analysis/CallGraphSCCPass.cpp @@ -124,7 +124,7 @@ bool CGPassManager::RunPassOnSCC(Pass *P, CallGraphSCC &CurSCC, Module &M = CG.getModule(); if (!PM) { - CallGraphSCCPass *CGSP = (CallGraphSCCPass*)P; + CallGraphSCCPass *CGSP = (CallGraphSCCPass *)P; if (!CallGraphUpToDate) { DevirtualizedCall |= RefreshCallGraph(CurSCC, CG, false); CallGraphUpToDate = true; @@ -140,13 +140,13 @@ bool CGPassManager::RunPassOnSCC(Pass *P, CallGraphSCC &CurSCC, if (EmitICRemark) { // FIXME: Add getInstructionCount to CallGraphSCC. - // TODO: emitInstrCountChangedRemark should take in the delta between - // SCCount and InstrCount. SCCCount = M.getInstructionCount(); // Is there a difference in the number of instructions in the module? if (SCCCount != InstrCount) { // Yep. Emit a remark and update InstrCount. - emitInstrCountChangedRemark(P, M, InstrCount); + int64_t Delta = + static_cast<int64_t>(SCCCount) - static_cast<int64_t>(InstrCount); + emitInstrCountChangedRemark(P, M, Delta, InstrCount); InstrCount = SCCCount; } } diff --git a/llvm/lib/Analysis/LoopPass.cpp b/llvm/lib/Analysis/LoopPass.cpp index 191d5f0f4ad..f60b1815ce4 100644 --- a/llvm/lib/Analysis/LoopPass.cpp +++ b/llvm/lib/Analysis/LoopPass.cpp @@ -224,9 +224,9 @@ bool LPPassManager::runOnFunction(Function &F) { // Update the size of the function, emit a remark, and update the // size of the module. if (NewSize != FunctionSize) { - emitInstrCountChangedRemark(P, M, InstrCount); int64_t Delta = static_cast<int64_t>(NewSize) - static_cast<int64_t>(FunctionSize); + emitInstrCountChangedRemark(P, M, Delta, InstrCount); InstrCount = static_cast<int64_t>(InstrCount) + Delta; FunctionSize = NewSize; } |