[PATCH] D73662: [llvm][NFC] Rename CallAnalyzer::onCommonInstructionSimplification
Mircea Trofin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 29 13:22:12 PST 2020
mtrofin created this revision.
mtrofin added reviewers: davidxl, eraman.
Herald added subscribers: llvm-commits, dkrupp, donat.nagy, Szelethus, a.sidorin, haicheng, baloghadamsoftware, hiraditya.
Herald added a project: LLVM.
It is called when instructions aren't simplified, and the implementation
is expected to account for a penalty. Renamed to
onCommonInstructionMissedSimplification.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D73662
Files:
llvm/lib/Analysis/InlineCost.cpp
Index: llvm/lib/Analysis/InlineCost.cpp
===================================================================
--- llvm/lib/Analysis/InlineCost.cpp
+++ 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 onCommonInstructionMissedSimplification() {}
/// 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 onCommonInstructionMissedSimplification() override {
addCost(InlineConstants::InstrCost);
}
@@ -1761,7 +1761,7 @@
if (Base::visit(&*I))
++NumInstructionsSimplified;
else
- onCommonInstructionSimplification();
+ onCommonInstructionMissedSimplification();
using namespace ore;
// If the visit this instruction detected an uninlinable pattern, abort.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73662.241273.patch
Type: text/x-patch
Size: 1083 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200129/973e7a9e/attachment.bin>
More information about the llvm-commits
mailing list