llvm-6502/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 Preserve and update ETForest. Patch by Daniel Berlin 2006-01-11 05:11:13 +00:00
CloneFunction.cpp Implement a new method, CloneAndPruneFunctionInto, as documented. 2006-05-27 01:22:24 +00:00
CloneModule.cpp Add a CloneModule call that exposes the mapping of values from the old module 2006-05-17 18:05:35 +00:00
CloneTrace.cpp Eliminate tabs and trailing spaces 2005-04-23 21:38:35 +00:00
CodeExtractor.cpp Add explicit #includes of <iostream> 2006-01-22 22:53:01 +00:00
DemoteRegToStack.cpp Fix DemoteRegToStack on an invoke. This fixes PR634. 2005-10-04 00:44:01 +00:00
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 Canonicalize inner loops before outer loops. Inner loop canonicalization 2006-02-14 23:06:02 +00:00
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 Move some constant folding code shared by Analysis and Transform passes 2005-10-27 15:54:34 +00:00
Mem2Reg.cpp Declare that lowerinvoke doesn't interact with other lowering passes. 2006-05-17 21:05:27 +00:00
PromoteMemoryToRegister.cpp Fix some nondeterminstic behavior in the mem2reg pass that (in addition to 2006-04-27 01:14:43 +00:00
SimplifyCFG.cpp remove some dead code identified by coverity 2006-05-14 18:45:44 +00:00
UnifyFunctionExitNodes.cpp Patch to make some xforms preserve each other. Patch contributed by 2006-05-09 04:13:41 +00:00
ValueMapper.cpp Implement a new method, CloneAndPruneFunctionInto, as documented. 2006-05-27 01:22:24 +00:00
ValueMapper.h Remove trailing whitespace 2005-04-21 23:48:37 +00:00