summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/CallGraphSCCPass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Analysis/CallGraphSCCPass.cpp')
-rw-r--r--llvm/lib/Analysis/CallGraphSCCPass.cpp8
1 files changed, 4 insertions, 4 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;
}
}
OpenPOWER on IntegriCloud