llvm/lib/Transforms/Utils
Chris Lattner 5b5bc3032f Switch the inliner over to using CloneAndPruneFunctionInto. This effectively
makes it so that it constant folds instructions on the fly.  This is good
for several reasons:

0. Many instructions are constant foldable after inlining, particularly if
   inlining a call with constant arguments.
1. Without this, the inliner has to allocate memory for all of the instructions
   that can be constant folded, then a subsequent pass has to delete them.  This
   gets the job done without this extra work.
2. This makes the inliner *pass* a bit more aggressive: in particular, it
   partially solves a phase order issue where the inliner would inline lots
   of code that folds away to nothing, but think that the resultant function
   is big because of this code that will be gone.  Now the code never exists.

This is the first part of a 2-step process.  The second part will be smart
enough to see when this implicit constant folding propagates a constant into
a branch or switch instruction, making CFG edges dead.

This implements Transforms/Inline/inline_constprop.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28521 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-27 01:28:04 +00:00
..
BasicBlockUtils.cpp Fix a doxygen problem and break lines at 80 columns 2006-05-19 19:09:46 +00:00
BreakCriticalEdges.cpp
CloneFunction.cpp Implement a new method, CloneAndPruneFunctionInto, as documented. 2006-05-27 01:22:24 +00:00
CloneModule.cpp
CloneTrace.cpp
CodeExtractor.cpp
DemoteRegToStack.cpp
InlineFunction.cpp Switch the inliner over to using CloneAndPruneFunctionInto. This effectively 2006-05-27 01:28:04 +00:00
LCSSA.cpp A few small clean-ups, and the addition of an LCSSA statistic. 2006-05-27 00:31:37 +00:00
Local.cpp Refactor some code to expose an interface to constant fold and instruction given it's opcode, typeand operands. 2006-05-27 01:18:04 +00:00
LoopSimplify.cpp
LowerAllocations.cpp Declare that lowerinvoke doesn't interact with other lowering passes. 2006-05-17 21:05:27 +00:00
LowerInvoke.cpp Declare that lowerinvoke doesn't interact with other lowering passes. 2006-05-17 21:05:27 +00:00
LowerSelect.cpp Declare that lowerinvoke doesn't interact with other lowering passes. 2006-05-17 21:05:27 +00:00
LowerSwitch.cpp Declare that lowerinvoke doesn't interact with other lowering passes. 2006-05-17 21:05:27 +00:00
Makefile
Mem2Reg.cpp Declare that lowerinvoke doesn't interact with other lowering passes. 2006-05-17 21:05:27 +00:00
PromoteMemoryToRegister.cpp
SimplifyCFG.cpp
UnifyFunctionExitNodes.cpp
ValueMapper.cpp Implement a new method, CloneAndPruneFunctionInto, as documented. 2006-05-27 01:22:24 +00:00
ValueMapper.h