diff --git a/llvm/lib/Analysis/InlineCost.cpp b/llvm/lib/Analysis/InlineCost.cpp --- a/llvm/lib/Analysis/InlineCost.cpp +++ b/llvm/lib/Analysis/InlineCost.cpp @@ -185,7 +185,7 @@ /// Called to account for any other instruction not specifically accounted /// for. - virtual void onCommonInstructionSimplification() {} + virtual void onMissedSimplification() {} /// Start accounting potential benefits due to SROA for the given alloca. virtual void onInitializeSROAArg(AllocaInst *Arg) {} @@ -502,7 +502,7 @@ addCost(SwitchCost, (int64_t)CostUpperBound); } - void onCommonInstructionSimplification() override { + void onMissedSimplification() override { addCost(InlineConstants::InstrCost); } @@ -1761,7 +1761,7 @@ if (Base::visit(&*I)) ++NumInstructionsSimplified; else - onCommonInstructionSimplification(); + onMissedSimplification(); using namespace ore; // If the visit this instruction detected an uninlinable pattern, abort.