aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/InlineCost.cpp
diff options
context:
space:
mode:
authorMircea Trofin <mtrofin@google.com>2020-01-29 21:07:15 -0800
committerMircea Trofin <mtrofin@google.com>2020-01-29 21:07:36 -0800
commit14a16fae434a86890546e5e0364086e231e7667e (patch)
treeb8e327a35658209954fa303f1e103674145c4896 /llvm/lib/Analysis/InlineCost.cpp
parentfa14522c219f500e46751d51f6219e2b9523d7bf (diff)
downloadllvm-14a16fae434a86890546e5e0364086e231e7667e.zip
llvm-14a16fae434a86890546e5e0364086e231e7667e.tar.gz
llvm-14a16fae434a86890546e5e0364086e231e7667e.tar.bz2
[llvm][NFC] Rename CallAnalyzer::onCommonInstructionSimplification
Summary: It is called when instructions aren't simplified, and the implementation is expected to account for a penalty. Renamed to onCommonInstructionMissedSimplification. Reviewers: davidxl, eraman Reviewed By: davidxl Subscribers: hiraditya, baloghadamsoftware, haicheng, a.sidorin, Szelethus, donat.nagy, dkrupp, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D73662
Diffstat (limited to 'llvm/lib/Analysis/InlineCost.cpp')
-rw-r--r--llvm/lib/Analysis/InlineCost.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/InlineCost.cpp b/llvm/lib/Analysis/InlineCost.cpp
index 2f2d593..49014e8 100644
--- a/llvm/lib/Analysis/InlineCost.cpp
+++ b/llvm/lib/Analysis/InlineCost.cpp
@@ -185,7 +185,7 @@ protected:
/// 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 @@ class InlineCostCallAnalyzer final : public CallAnalyzer {
addCost(SwitchCost, (int64_t)CostUpperBound);
}
- void onCommonInstructionSimplification() override {
+ void onMissedSimplification() override {
addCost(InlineConstants::InstrCost);
}
@@ -1761,7 +1761,7 @@ CallAnalyzer::analyzeBlock(BasicBlock *BB,
if (Base::visit(&*I))
++NumInstructionsSimplified;
else
- onCommonInstructionSimplification();
+ onMissedSimplification();
using namespace ore;
// If the visit this instruction detected an uninlinable pattern, abort.