Lines Matching refs:Function
13 // argument is *only* loaded, then it can pass the value into the function
18 // This pass also handles aggregate arguments that are passed into a function,
21 // more than three operands to the function, because passing thousands of
79 CallGraphNode *DoPromotion(Function *F,
117 /// PromoteArguments - This method checks the specified function to see if there
118 /// are any promotable arguments and if it is safe to promote the function (for
123 Function *F = CGN->getFunction();
131 for (Function::arg_iterator I = F->arg_begin(), E = F->arg_end();
138 // transform functions that have indirect callers. Also see if the function
167 << " than " << maxElements << " arguments to the function.\n");
191 // function, we could end up infinitely peeling the function argument.
219 /// all callees pass in a valid pointer for the specified function argument.
221 Function *Callee = Arg->getParent();
224 Function::arg_iterator(Arg));
226 // Look at all call sites of the function. At this pointer we know we only
437 << "than " << maxElements << " arguments to the function.\n");
451 // the function to each of the load instructions.
482 // If the path from the entry of the function to each load is free of
489 /// arguments, and returns the new function. At this point, we know that it's
491 CallGraphNode *ArgPromotion::DoPromotion(Function *F,
495 // Start by computing a new prototype for the function, which is the same as
496 // the old function, but has modified arguments.
512 // original function so that we can tell the alias analysis implementation
528 for (Function::arg_iterator I = F->arg_begin(), E = F->arg_end(); I != E;
577 // Add a parameter to the function for each element passed in.
592 // Add any function attributes.
606 // Construct the new function type using the new arguments.
609 // Create the new function body and insert it into the module.
610 Function *NF = Function::Create(NFTy, F->getLinkage(), F->getName());
618 // the function.
637 // Loop over all of the callers of the function, transforming the call sites
655 for (Function::arg_iterator I = F->arg_begin(), E = F->arg_end();
728 // Add any function attributes.
768 // Since we have now created the new function, splice the body of the old
769 // function right into the new function, leaving the old rotting hulk of the
770 // function empty.
776 for (Function::arg_iterator I = F->arg_begin(), E = F->arg_end(),
836 << "' in function '" << F->getName() << "'\n");
849 Function::arg_iterator TheArg = I2;
863 << "' of function '" << NF->getName() << "'\n");
889 // Tell the alias analysis that the old function is about to disappear.
895 // Now that the old function is dead, delete it. If there is a dangling
896 // reference to the CallgraphNode, just leave the dead function around for
902 F->setLinkage(Function::ExternalLinkage);