We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8669225 commit d312788Copy full SHA for d312788
llvm/lib/Analysis/InlineOrder.cpp
@@ -114,7 +114,10 @@ class CostBenefitPriority {
114
CostBenefitPriority(const CallBase *CB, FunctionAnalysisManager &FAM,
115
const InlineParams &Params) {
116
auto IC = getInlineCostWrapper(const_cast<CallBase &>(*CB), FAM, Params);
117
- Cost = IC.getCost();
+ if (IC.isVariable())
118
+ Cost = IC.getCost();
119
+ else
120
+ Cost = IC.isNever() ? INT_MAX : INT_MIN;
121
StaticBonusApplied = IC.getStaticBonusApplied();
122
CostBenefit = IC.getCostBenefit();
123
}
0 commit comments