Home | History | Annotate | Download | only in Analysis

Lines Matching refs:Callee

235   // Look at the size of the callee.
267 // performance boost for using a specialization of Callee with argument
269 int InlineCostAnalyzer::getSpecializationBonus(Function *Callee,
272 if (Callee->mayBeOverridden())
278 if (Callee->getCallingConv() == CallingConv::Cold)
281 // Get information about the callee.
282 FunctionInfo *CalleeFI = &CachedFunctionInfo[Callee];
286 CalleeFI->analyzeFunction(Callee, TD);
290 for (Function::arg_iterator I = Callee->arg_begin(), E = Callee->arg_end();
370 int InlineCostAnalyzer::getInlineSize(CallSite CS, Function *Callee) {
371 // Get information about the callee.
372 FunctionInfo *CalleeFI = &CachedFunctionInfo[Callee];
376 CalleeFI->analyzeFunction(Callee, TD);
389 for (Function::arg_iterator FI = Callee->arg_begin(), FE = Callee->arg_end();
400 // weights calculated for the callee to determine how much will be folded
406 // Each argument passed in has a cost at both the caller and the callee
417 // Look at the size of the callee. Each instruction counts as 5.
423 int InlineCostAnalyzer::getInlineBonuses(CallSite CS, Function *Callee) {
424 // Get information about the callee.
425 FunctionInfo *CalleeFI = &CachedFunctionInfo[Callee];
429 CalleeFI->analyzeFunction(Callee, TD);
431 bool isDirectCall = CS.getCalledFunction() == Callee;
438 if (Callee->hasLocalLinkage() && Callee->hasOneUse() && isDirectCall)
452 if (Callee->getCallingConv() == CallingConv::Cold)
461 for (Function::arg_iterator FI = Callee->arg_begin(), FE = Callee->arg_end();
479 Function *Callee,
487 if (Callee->mayBeOverridden() ||
488 Callee->hasFnAttr(Attribute::NoInline) || NeverInline.count(Callee) ||
492 // Get information about the callee.
493 FunctionInfo *CalleeFI = &CachedFunctionInfo[Callee];
497 CalleeFI->analyzeFunction(Callee, TD);
507 if (!Callee->isDeclaration() && Callee->hasFnAttr(Attribute::AlwaysInline))
520 CalleeFI = &CachedFunctionInfo[Callee];
523 // Don't inline a callee with dynamic alloca into a caller without them.
535 int InlineCost = getInlineSize(CS, Callee) + getInlineBonuses(CS, Callee);
540 // impact of creating a specialized version of Callee with argument
542 InlineCost InlineCostAnalyzer::getSpecializationCost(Function *Callee,
547 if (Callee->mayBeOverridden())
550 // Get information about the callee.
551 FunctionInfo *CalleeFI = &CachedFunctionInfo[Callee];
555 CalleeFI->analyzeFunction(Callee, TD);
559 // Look at the original size of the callee. Each instruction counts as 5.
574 Function *Callee = CS.getCalledFunction();
576 // Get information about the callee.
577 FunctionInfo &CalleeFI = CachedFunctionInfo[Callee];
581 CalleeFI.analyzeFunction(Callee, TD);
597 /// growCachedCostInfo - update the cached cost info for Caller after Callee has
600 InlineCostAnalyzer::growCachedCostInfo(Function *Caller, Function *Callee) {
614 if (Callee == 0) return;
616 CodeMetrics &CalleeMetrics = CachedFunctionInfo[Callee].Metrics;
618 // If we don't have metrics for the callee, don't recalculate them just to
630 // FIXME: If any of these three are true for the callee, the callee was
643 if (CallerMetrics.NumInsts >= Callee->arg_size())
644 CallerMetrics.NumInsts -= Callee->arg_size();