Home | History | Annotate | Download | only in Scalar

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.
59 #include "llvm/Function.h"
87 virtual bool runOnFunction(Function &F);
121 /// callees of this function. We only do very simple analysis right now, this
139 // If this alloca is in the body of the function, or if it is a variable
149 bool TailCallElim::runOnFunction(Function &F) {
150 // If this function is a varargs function, we won't be able to PHI the args
166 // Loop over the function, looking for any returning blocks, and keeping track
167 // of whether this function has any non-trivially used allocas.
168 for (Function::iterator BB = F.begin(), E = F.end(); BB != E; ++BB) {
184 for (Function::iterator BB = F.begin(), E = F.end(); BB != E; ++BB) {
199 // occurs when a function passes an argument straight through to its tail
213 // Finally, if this function contains no non-escaping allocas, or calls
214 // setjmp, mark all calls in the function as eligible for tail calls
217 for (Function::iterator BB = F.begin(), E = F.end(); BB != E; ++BB)
265 // function was executed.
278 Function *F = CI->getParent()->getParent();
279 for (Function::arg_iterator AI = F->arg_begin(); &*AI != Arg; ++AI)
284 // Otherwise, we cannot transform this function safely.
301 // getCommonReturnValue - Check to see if the function containing the specified
306 Function *F = CI->getParent()->getParent();
309 for (Function::iterator BBI = F->begin(), E = F->end(); BBI != E; ++BBI) {
314 // evaluatable at the start of the initial invocation of the function,
348 // function. If they return non-constants or differing values, then we cannot
349 // transform the function safely.
363 Function *F = BB->getParent();
383 // the function, we cannot perform this optimization.
395 // A single-block function with just a call and a return. Check that
399 Function::arg_iterator FI = F->arg_begin(),
471 Function *F = BB->getParent();
494 // block, insert a PHI node for each argument of the function.
498 for (Function::arg_iterator I = F->arg_begin(), E = F->arg_end();
508 // If this function has self recursive calls in the tail position where some
512 // slightly better here in the case that the function has no entry block
525 // eliminations will happen on this function because of the way the
538 // real entry into the function we seed the PHI with the initial value,
569 for (Function::iterator BBI = F->begin(), E = F->end(); BBI != E; ++BBI)