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;
- }
+
// 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)
- {
Cost -= CalleeFI->ArgumentWeights[*an].ConstantWeight;
- }
return llvm::InlineCost::get(Cost);
}