* Teach this code to move allocas out of the loop when tail call eliminating
a call marked 'tail'. This implements TailCallElim/move_alloca_for_tail_call.ll
* Do not perform this transformation if a call is marked 'tail' and if there
are allocas that we cannot move out of the loop in #2. Doing so would increase
the stack usage of the function. This implements fixes
PR615 and TailCallElim/dont-tce-tail-marked-call.ll.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22690 91177308-0d34-0410-b5e6-96231b3b80d8
using Function::arg_{iterator|begin|end}. Likewise Module::g* -> Module::global_*.
This patch is contributed by Gabor Greif, thanks!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20597 91177308-0d34-0410-b5e6-96231b3b80d8
Move include/Config and include/Support into include/llvm/Config,
include/llvm/ADT and include/llvm/Support. From here on out, all LLVM
public header files must be under include/llvm/.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16137 91177308-0d34-0410-b5e6-96231b3b80d8
We now insert accumulator variables as necessary to eliminate tail recursion
more aggressively. This is still fairly limited, but allows us to transform
fib/factorial, and other functions into nice happy loops. :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10332 91177308-0d34-0410-b5e6-96231b3b80d8
The only functionality change is that we now implement:
Regression/Transforms/TailCallElim/intervening-inst.ll
Which is really kinda pointless, because it means that trivially dead code
does not interfere with -tce, but trivially dead code probably wouldn't be
around anytime when this pass is run anyway.
The point of including this change it to support other more aggressive
transformations when we have the analysis capabilities to do so.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10312 91177308-0d34-0410-b5e6-96231b3b80d8