git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124260
91177308-0d34-0410-b5e6-
96231b3b80d8
if (CalleeFI->Metrics.NumBlocks == 0)
CalleeFI->analyzeFunction(Callee);
if (CalleeFI->Metrics.NumBlocks == 0)
CalleeFI->analyzeFunction(Callee);
-
- for (unsigned i = 0, s = SpecializedArgNos.size();
- i < s; ++i )
- {
+ for (unsigned i = 0, s = SpecializedArgNos.size(); i < s; ++i )
Bonus += CalleeFI->ArgumentWeights[SpecializedArgNos[i]].ConstantBonus;
Bonus += CalleeFI->ArgumentWeights[SpecializedArgNos[i]].ConstantBonus;
// Calls usually take a long time, so they make the specialization gain
// smaller.
Bonus -= CalleeFI->Metrics.NumCalls * InlineConstants::CallPenalty;
// Calls usually take a long time, so they make the specialization gain
// smaller.
Bonus -= CalleeFI->Metrics.NumCalls * InlineConstants::CallPenalty;
// away with the given arguments replaced by constants.
for (SmallVectorImpl<unsigned>::iterator an = SpecializedArgNos.begin(),
ae = SpecializedArgNos.end(); an != ae; ++an)
// away with the given arguments replaced by constants.
for (SmallVectorImpl<unsigned>::iterator an = SpecializedArgNos.begin(),
ae = SpecializedArgNos.end(); an != ae; ++an)
Cost -= CalleeFI->ArgumentWeights[*an].ConstantWeight;
Cost -= CalleeFI->ArgumentWeights[*an].ConstantWeight;
return llvm::InlineCost::get(Cost);
}
return llvm::InlineCost::get(Cost);
}