Home | History | Annotate | Download | only in IPA

Lines Matching refs:Function

51   // The called function.
52 Function &F;
72 // this call through the inlinable section of the function, and account for
75 // can cause dramatic shifts in the cost of inlining a function.
78 // Keep track of the values which map back (through function arguments) to
103 bool simplifyCallSite(Function *F, CallSite CS);
112 void visit(Function *); void visit(Function &);
138 Function &Callee, int Threshold)
170 /// \brief Test whether the given value is an Alloca-derived function argument.
669 /// Takes a concrete function and callsite and tries to actually simplify it by
673 bool CallAnalyzer::simplifyCallSite(Function *F, CallSite CS) {
714 if (Function *F = CS.getCalledFunction()) {
715 // When we have a concrete function, first try to simplify it directly.
755 // Otherwise we're in a very special case -- an indirect function call. See
763 // Next, check if this happens to be an indirect function call to a known
764 // function in this inline context. If not, we've done all we can.
765 Function *F = dyn_cast_or_null<Function>(SimplifiedValues.lookup(Callee));
769 // If we have a constant that we are calling as a function, we can peer
770 // through it and see the function target. This happens not infrequently
773 // out. Pretend to inline the function, with a custom threshold.
827 // If the caller is a recursive function then we don't want to inline
898 // Track whether the post-inlining function would have more than one basic
944 // If there is only one call of the function, and it has internal linkage,
952 // invoke is an unreachable instruction, the function is noreturn. As such,
962 // If this function uses the coldcc calling convention, prefer not to inline
974 Function *Caller = CS.getInstruction()->getParent()->getParent();
975 // Check if the caller function is recursive itself.
992 // Populate our simplified values by mapping from function arguments to call
995 for (Function::arg_iterator FAI = F.arg_begin(), FAE = F.arg_end();
1039 // function-wide constructs.
1044 // for example) would be referring to the original function, and this
1045 // indirect jump would jump from the inlined copy of the function into the
1046 // original function which is extremely undefined behavior.
1048 // with indirectbr's as long as no other function or global references the
1049 // blockaddress of a block within the current function. And as a QOI issue,
1051 // reference somehow ends up in another function or global, we probably
1052 // don't want to inline this function.
1067 // If the caller is a recursive function then we don't want to inline
1170 InlineCost InlineCostAnalysis::getInlineCost(CallSite CS, Function *Callee,
1211 bool InlineCostAnalysis::isInlineViable(Function &F) {
1215 for (Function::iterator BI = F.begin(), BE = F.end(); BI != BE; ++BI) {
1230 // Disallow calls which expose returns-twice to a function not previously