1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 10:42:39 +01:00

[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
This commit is contained in:
Mircea Trofin 2020-01-29 21:07:15 -08:00
parent 87965b5f59
commit 358d79805a

View File

@ -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.