Lines Matching refs:Function
10 // This file transforms calls of the current function (self recursion) followed
11 // by a return instruction with a branch to the entry of the function, creating
22 // 3. TRE is performed if the function returns void, if the return
23 // returns the result returned by the call, or if the function returns a
24 // run-time constant on all exits from the function. It is possible, though
27 // the function return the exact same value.
34 // 1. If the function has any alloca instructions, these instructions will be
35 // moved out of the entry block of the function, causing them to be
38 // function does not read or write the stack object.
64 #include "llvm/IR/Function.h"
92 virtual bool runOnFunction(Function &F);
133 /// callees of this function. We only do very simple analysis right now, this
151 // If this alloca is in the body of the function, or if it is a variable
161 bool TailCallElim::runOnFunction(Function &F) {
162 // If this function is a varargs function, we won't be able to PHI the args
179 // Loop over the function, looking for any returning blocks, and keeping track
180 // of whether this function has any non-trivially used allocas.
181 for (Function::iterator BB = F.begin(), E = F.end(); BB != E; ++BB) {
197 for (Function::iterator BB = F.begin(), E = F.end(); BB != E; ++BB) {
212 // occurs when a function passes an argument straight through to its tail
226 // Finally, if this function contains no non-escaping allocas, or calls
227 // setjmp, mark all calls in the function as eligible for tail calls
230 for (Function::iterator BB = F.begin(), E = F.end(); BB != E; ++BB)
278 // function was executed.
291 Function *F = CI->getParent()->getParent();
292 for (Function::arg_iterator AI = F->arg_begin(); &*AI != Arg; ++AI)
297 // Otherwise, we cannot transform this function safely.
314 // getCommonReturnValue - Check to see if the function containing the specified
319 Function *F = CI->getParent()->getParent();
322 for (Function::iterator BBI = F->begin(), E = F->end(); BBI != E; ++BBI) {
327 // evaluatable at the start of the initial invocation of the function,
361 // function. If they return non-constants or differing values, then we cannot
362 // transform the function safely.
376 Function *F = BB->getParent();
396 // the function, we cannot perform this optimization.
409 // A single-block function with just a call and a return. Check that
413 Function::arg_iterator FI = F->arg_begin(),
485 Function *F = BB->getParent();
508 // block, insert a PHI node for each argument of the function.
512 for (Function::arg_iterator I = F->arg_begin(), E = F->arg_end();
522 // If this function has self recursive calls in the tail position where some
526 // slightly better here in the case that the function has no entry block
539 // eliminations will happen on this function because of the way the
552 // real entry into the function we seed the PHI with the initial value,
583 for (Function::iterator BBI = F->begin(), E = F->end(); BBI != E; ++BBI)