Lines Matching refs:Function
41 // to inline a function A into B, we analyze the callers of B in order to see
75 /// \brief If the inlined function had a higher stack protection level than the
76 /// calling function, then bump up the caller's stack protection level.
77 static void AdjustCallerSSPLevel(Function *Caller, Function *Callee) {
112 /// This function also does some basic book-keeping to update the IR. The
120 Function *Callee = CS.getCalledFunction();
121 Function *Caller = CS.getCaller();
123 // Try to inline the function. Get the list of static allocas that were
131 // have already inlined other allocas through other calls into this function,
188 // function. Also, AllocasForType can be empty of course!
193 // The available alloca has to be in the right function, not in some other
194 // function in this SCC.
198 // If the inlined function already uses this alloca then we can't reuse
222 // already, remember that this alloca came from an inlined function and mark
238 Function *Caller = CS.getCaller();
248 Function *Callee = CS.getCalledFunction();
277 Function *Caller = CS.getCaller();
286 // it B) is a static or linkonce-ODR function and is an inlining candidate
304 // The candidate cost to be imposed upon the current function.
361 /// indicates an inline history that includes the specified function.
362 static bool InlineHistoryIncludes(Function *F, int InlineHistoryID,
363 const SmallVectorImpl<std::pair<Function*, int> > &InlineHistory) {
379 SmallPtrSet<Function*, 8> SCCFunctions;
382 Function *F = (*I)->getFunction();
396 SmallVector<std::pair<Function*, int>, 8> InlineHistory;
399 Function *F = (*I)->getFunction();
402 for (Function::iterator BB = F->begin(), E = F->end(); BB != E; ++BB)
410 // If this is a direct call to an external function, we can never inline
422 // If there are no calls in this function, exit early.
430 if (Function *F = CallSites[i].first.getCalledFunction())
449 Function *Caller = CS.getCaller();
450 Function *Callee = CS.getCalledFunction();
452 // If this call site is dead and it is to a readonly function, we should
467 // If this call site was obtained by inlining another function, verify
468 // that the include path for the function did not include the callee
469 // itself. If so, we'd be recursively inlining the same function,
478 // If the policy determines that we should inline this function,
483 // Attempt to inline the function.
489 // If inlining this function gave us any new call sites, throw them
505 // If we inlined or deleted the last possible call site to the function,
506 // delete the function body now.
511 // The function may be apparently dead, but if there are indirect
515 DEBUG(dbgs() << " -> Deleting dead function: "
529 // move a call site to a function in this SCC before the
562 Function *F = CGN->getFunction();
566 // Handle the case when this function is called and we only want to care
574 // If the only remaining users of the function are dead constants, remove
581 // Remove any call graph edges from the function to its callees.
584 // Remove any edges from the external node to the function's call graph