Lines Matching defs:IC
175 /// inlined which is proved to be more beneficial. \p IC is the
180 shouldBeDeferred(Function *Caller, InlineCost IC, int &TotalSecondaryCost,
188 if (IC.getCost() <= 0)
208 int CandidateCost = IC.getCost() - 1;
256 // inlining -- IC.getCost() multiplied by the number of callers to Caller.
258 return TotalSecondaryCost < IC.getCost();
260 int TotalCost = TotalSecondaryCost + IC.getCost() * NumCallerUsers;
261 int Allowance = IC.getCost() * InlineDeferralScale;
272 RemarkT &operator<<(RemarkT &&R, const InlineCost &IC) {
274 if (IC.isAlways()) {
276 } else if (IC.isNever()) {
279 R << "(cost=" << ore::NV("Cost", IC.getCost())
280 << ", threshold=" << ore::NV("Threshold", IC.getThreshold()) << ")";
282 if (const char *Reason = IC.getReason())
288 std::string llvm::inlineCostStr(const InlineCost &IC) {
290 Remark << IC;
312 InlineCost IC = GetInlineCost(CB);
317 if (IC.isAlways()) {
318 LLVM_DEBUG(dbgs() << " Inlining " << inlineCostStr(IC)
320 return IC;
323 if (!IC) {
324 LLVM_DEBUG(dbgs() << " NOT Inlining " << inlineCostStr(IC)
326 if (IC.isNever()) {
331 << IC;
338 << IC;
341 setInlineRemark(CB, inlineCostStr(IC));
347 shouldBeDeferred(Caller, IC, TotalSecondaryCost, GetInlineCost)) {
349 << " Cost = " << IC.getCost()
359 // IC does not bool() to false, so get an InlineCost that will.
364 LLVM_DEBUG(dbgs() << " Inlining " << inlineCostStr(IC) << ", Call: " << CB
366 return IC;
393 const Function &Caller, const InlineCost &IC,
396 bool AlwaysInline = IC.isAlways();
404 Remark << " with " << IC;