Index: llvm/lib/Analysis/InlineCost.cpp =================================================================== --- llvm/lib/Analysis/InlineCost.cpp +++ llvm/lib/Analysis/InlineCost.cpp @@ -53,7 +53,7 @@ cl::ZeroOrMore, cl::desc("Default amount of inlining to perform")); -static cl::opt EnableInstructionDelta("print-instruction-delta", +static cl::opt PrintDebugInstructionDeltas("print-instruction-deltas", cl::Hidden, cl::init(false), cl::desc("Prints deltas of cost and threshold per instruction")); @@ -121,8 +121,8 @@ // accounting for the given instruction. DenseMap CostThresholdMap; - virtual void emitInstructionAnnot(const llvm::Instruction *I, - llvm::formatted_raw_ostream &OS); + virtual void emitInstructionAnnot(const Instruction *I, + formatted_raw_ostream &OS); }; class CallAnalyzer : public InstVisitor { @@ -573,7 +573,7 @@ void onInstructionAnalysisStart(const Instruction *I) override { // This function is called to store the initial cost of inlining before // the given instruction was assessed. - if (!EnableInstructionDelta) + if (!PrintDebugInstructionDeltas) return ; Writer.CostThresholdMap[I].CostBefore = Cost; Writer.CostThresholdMap[I].ThresholdBefore = Threshold; @@ -582,7 +582,7 @@ void onInstructionAnalysisFinish(const Instruction *I) override { // This function is called to find new values of cost and threshold after // the instruction has been assessed. - if (!EnableInstructionDelta) + if (!PrintDebugInstructionDeltas) return ; Writer.CostThresholdMap[I].CostAfter = Cost; Writer.CostThresholdMap[I].ThresholdAfter = Threshold; @@ -1835,8 +1835,7 @@ // instruction. Visit the instructions using our InstVisitor to account for // all of the per-instruction logic. The visit tree returns true if we // consumed the instruction in any way, and false if the instruction's base - // cost should count against inlining. The deltas are saved for the - // CostAnnotationWriter. + // cost should count against inlining. onInstructionAnalysisStart(&*I); if (Base::visit(&*I)) @@ -2126,7 +2125,7 @@ /// Dump stats about this call's analysis. LLVM_DUMP_METHOD void InlineCostCallAnalyzer::dump() { #define DEBUG_PRINT_STAT(x) dbgs() << " " #x ": " << x << "\n" - if (EnableInstructionDelta) + if (PrintDebugInstructionDeltas) F.print(dbgs(), &Writer); DEBUG_PRINT_STAT(NumConstantArgs); DEBUG_PRINT_STAT(NumConstantOffsetPtrArgs); Index: llvm/test/DebugInfo/debuginline-cost-delta.ll =================================================================== --- llvm/test/DebugInfo/debuginline-cost-delta.ll +++ llvm/test/DebugInfo/debuginline-cost-delta.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -inline -debug-only=inline-cost -disable-output -print-instruction-delta |& FileCheck %s +; RUN: opt < %s -inline -debug-only=inline-cost -disable-output -print-instruction-deltas |& FileCheck %s ; CHECK: Analyzing call of callee1... (caller:foo) ; CHECK: define i32 @callee1(i32 %x) {