Lines Matching refs:Function
26 bool llvm::callIsSmall(const Function *F) {
71 if (const Function *F = CS.getCalledFunction()) {
72 // If a function is both internal and has a single use, then it is
78 // If this call is to function itself, then the function is recursive.
135 // for example) would be referring to the original function, and this indirect
136 // jump would jump from the inlined copy of the function into the original
137 // function which is extremely undefined behavior.
198 // the function will be if it is inlined into a context where an argument
226 /// from the specified function.
227 void CodeMetrics::analyzeFunction(Function *F, const TargetData *TD) {
228 // If this function contains a call that "returns twice" (e.g., setjmp or
235 for (Function::const_iterator BB = F->begin(), E = F->end(); BB != E; ++BB)
240 /// from the specified function.
241 void InlineCostAnalyzer::FunctionInfo::analyzeFunction(Function *F,
245 // A function with exactly one return has it removed during the inlining
251 // Check out all of the arguments to the function, figuring out how much
254 for (Function::arg_iterator I = F->arg_begin(), E = F->arg_end(); I != E; ++I)
259 /// NeverInline - returns true if the function should never be inlined into
268 int InlineCostAnalyzer::getSpecializationBonus(Function *Callee,
275 // If this function uses the coldcc calling convention, prefer not to
289 for (Function::arg_iterator I = Callee->arg_begin(), E = Callee->arg_end();
304 // possibly devirtualizing a function. We'll subtract the size of the function
314 Function *F = dyn_cast<Function>(C);
369 int InlineCostAnalyzer::getInlineSize(CallSite CS, Function *Callee) {
384 // the function.
388 for (Function::arg_iterator FI = Callee->arg_begin(), FE = Callee->arg_end();
391 // If an alloca is passed in, inlining this function is likely to allow
393 // scalarization), so encourage the inlining of the function.
398 // If this is a constant being passed into the function, use the argument
422 int InlineCostAnalyzer::getInlineBonuses(CallSite CS, Function *Callee) {
434 // If there is only one call of the function, and it has internal linkage,
441 // invoke is an unreachable instruction, the function is noreturn. As such,
449 // If this function uses the coldcc calling convention, prefer not to inline
456 // the function will be optimizable. Currently this just looks at arguments
457 // passed into the function.
460 for (Function::arg_iterator FI = Callee->arg_begin(), FE = Callee->arg_end();
470 // function call or not.
473 SmallPtrSet<const Function*, 16> &NeverInline) {
478 Function *Callee,
479 SmallPtrSet<const Function*, 16> &NeverInline) {
481 Function *Caller = TheCall->getParent()->getParent();
541 InlineCost InlineCostAnalyzer::getSpecializationCost(Function *Callee,
571 // higher threshold to determine if the function call should be inlined.
573 Function *Callee = CS.getCalledFunction();
587 // Be more aggressive if the function contains a good chunk (if it mades up
599 InlineCostAnalyzer::growCachedCostInfo(Function *Caller, Function *Callee) {
641 // analyzeBasicBlock counts each function argument as an inst.
648 // Caller is a fairly large function, so we accept the loss of precision.