Home | History | Annotate | Download | only in Scalar

Lines Matching full:tail

1 //===- TailRecursionElimination.cpp - Eliminate Tail Calls ----------------===//
18 // 2. This pass transforms functions that are prevented from being tail
29 // they are marked as eligible for tail call elimination (by the code
36 // evaluated each time through the tail recursion. Safely keeping allocas
37 // in the entry block requires analysis to proves that the tail-called
39 // 2. Tail recursion is only performed if the call immediately precedes the
83 STATISTIC(NumEliminated, "Number of tail calls removed");
127 "Tail Call Elimination", false, false)
130 "Tail Call Elimination", false, false)
284 // the same block twice. Because of this, we defer setting tail on calls when
304 // outside this function can be marked tail. Even if you stored the
323 "marked this readnone call a tail call candidate");
370 "marked this call a tail call candidate");
392 // If false, we cannot perform TRE on tail calls marked with the 'tail'
397 // Change any tail recursive calls to loops.
416 // If we eliminated any tail recursions, it's possible that we inserted some
419 // occurs when a function passes an argument straight through to its tail
506 /// Check to see if the function containing the specified tail call consistently
571 // Scan backwards from the return, checking to see if there is a tail call in
581 return nullptr; // Didn't find a potential tail call.
585 // If this call is marked as a tail call, and if there are dynamic allocas in
623 // simple tail recursion elimination. If the operation is an LLVM instruction
632 // Ok, we found a potential tail call. We can currently only transform the
633 // tail call if all of the instructions between the call and the return are
650 return false; // Otherwise, we cannot eliminate the tail recursion!
656 // constant, return the value returned by the tail call, or that are being
678 "transforming tail recursion to loop");
680 // OK! We can transform this tail call. If this is the first one found,
689 // If this tail call is marked 'tail' and if there are any allocas in the
715 // If this function has self recursive calls in the tail position where some
716 // are marked tail and some are not, only transform one flavor or another. We
726 // parameters passed into the tail-recursive call.
731 // do so now. Note that we _know_ that no subsequent tail recursion
744 // Loop over all of the predecessors of the tail recursion block. For the
747 // other tail recursions eliminated) the accumulator is not modified.