* Use the new PHINode::hasConstantValue method to simplify some code
authorChris Lattner <sabre@nondot.org>
Sun, 7 Aug 2005 04:27:41 +0000 (04:27 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 7 Aug 2005 04:27:41 +0000 (04:27 +0000)
commitce869ee05bfcb9d4750a3d0919a8260a727841c3
tree2ce650e41156492339b520ecb4268a3018817318
parent8cc70cbea4a78e9020c6b4efaccca5940bd22013
* Use the new PHINode::hasConstantValue method to simplify some code
* 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
lib/Transforms/Scalar/TailRecursionElimination.cpp