Home | History | Annotate | Download | only in Analysis

Lines Matching defs:Callee

234   // Look at the size of the callee.
266 // performance boost for using a specialization of Callee with argument
268 int InlineCostAnalyzer::getSpecializationBonus(Function *Callee,
271 if (Callee->mayBeOverridden())
277 if (Callee->getCallingConv() == CallingConv::Cold)
280 // Get information about the callee.
281 FunctionInfo *CalleeFI = &CachedFunctionInfo[Callee];
285 CalleeFI->analyzeFunction(Callee, TD);
289 for (Function::arg_iterator I = Callee->arg_begin(), E = Callee->arg_end();
369 int InlineCostAnalyzer::getInlineSize(CallSite CS, Function *Callee) {
370 // Get information about the callee.
371 FunctionInfo *CalleeFI = &CachedFunctionInfo[Callee];
375 CalleeFI->analyzeFunction(Callee, TD);
388 for (Function::arg_iterator FI = Callee->arg_begin(), FE = Callee->arg_end();
399 // weights calculated for the callee to determine how much will be folded
405 // Each argument passed in has a cost at both the caller and the callee
416 // Look at the size of the callee. Each instruction counts as 5.
422 int InlineCostAnalyzer::getInlineBonuses(CallSite CS, Function *Callee) {
423 // Get information about the callee.
424 FunctionInfo *CalleeFI = &CachedFunctionInfo[Callee];
428 CalleeFI->analyzeFunction(Callee, TD);
430 bool isDirectCall = CS.getCalledFunction() == Callee;
437 if (Callee->hasLocalLinkage() && Callee->hasOneUse() && isDirectCall)
451 if (Callee->getCallingConv() == CallingConv::Cold)
460 for (Function::arg_iterator FI = Callee->arg_begin(), FE = Callee->arg_end();
478 Function *Callee,
486 if (Callee->mayBeOverridden() ||
487 Callee->hasFnAttr(Attribute::NoInline) || NeverInline.count(Callee) ||
491 // Get information about the callee.
492 FunctionInfo *CalleeFI = &CachedFunctionInfo[Callee];
496 CalleeFI->analyzeFunction(Callee, TD);
506 if (!Callee->isDeclaration() && Callee->hasFnAttr(Attribute::AlwaysInline))
519 CalleeFI = &CachedFunctionInfo[Callee];
522 // Don't inline a callee with dynamic alloca into a caller without them.
534 int InlineCost = getInlineSize(CS, Callee) + getInlineBonuses(CS, Callee);
539 // impact of creating a specialized version of Callee with argument
541 InlineCost InlineCostAnalyzer::getSpecializationCost(Function *Callee,
546 if (Callee->mayBeOverridden())
549 // Get information about the callee.
550 FunctionInfo *CalleeFI = &CachedFunctionInfo[Callee];
554 CalleeFI->analyzeFunction(Callee, TD);
558 // Look at the original size of the callee. Each instruction counts as 5.
573 Function *Callee = CS.getCalledFunction();
575 // Get information about the callee.
576 FunctionInfo &CalleeFI = CachedFunctionInfo[Callee];
580 CalleeFI.analyzeFunction(Callee, TD);
596 /// growCachedCostInfo - update the cached cost info for Caller after Callee has
599 InlineCostAnalyzer::growCachedCostInfo(Function *Caller, Function *Callee) {
613 if (Callee == 0) return;
615 CodeMetrics &CalleeMetrics = CachedFunctionInfo[Callee].Metrics;
617 // If we don't have metrics for the callee, don't recalculate them just to
629 // FIXME: If any of these three are true for the callee, the callee was
642 if (CallerMetrics.NumInsts >= Callee->arg_size())
643 CallerMetrics.NumInsts -= Callee->arg_size();