llvm-6502/lib/Transforms/Scalar
Chris Lattner 5eecb7f164 This adds in some code (currently disabled unless you pass
-enable-smarter-addr-folding to llc) that gives CGP a better
cost model for when to sink computations into addressing modes.
The basic observation is that sinking increases register 
pressure when part of the addr computation has to be available
for other reasons, such as having a use that is a non-memory
operation.  In cases where it works, it can substantially reduce
register pressure.

This code is currently an overall win on 403.gcc and 255.vortex
(the two things I've been looking at), but there are several 
things I want to do before enabling it by default:

1. This isn't doing any caching of results, so it is much slower 
   than it could be.  It currently slows down release-asserts llc 
   by 1.7% on 176.gcc: 27.12s -> 27.60s.
2. This doesn't think about inline asm memory operands yet.
3. The cost model botches the case when the needed value is live
   across the computation for other reasons.

I'll continue poking at this, and eventually turn it on as llcbeta.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60074 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-26 02:00:14 +00:00
..
ADCE.cpp Let instcombiner remove redundant dbg intrinsics. 2008-11-19 18:59:41 +00:00
BasicBlockPlacement.cpp Tidy up several unbeseeming casts from pointer to intptr_t. 2008-09-04 17:05:41 +00:00
CMakeLists.txt CMake: updated list of source files. 2008-11-05 00:11:22 +00:00
CodeGenPrepare.cpp This adds in some code (currently disabled unless you pass 2008-11-26 02:00:14 +00:00
CondPropagate.cpp Tidy up several unbeseeming casts from pointer to intptr_t. 2008-09-04 17:05:41 +00:00
ConstantProp.cpp Tidy up several unbeseeming casts from pointer to intptr_t. 2008-09-04 17:05:41 +00:00
DCE.cpp Decrementing the iterator here could be wrong if the worklist is empty after the "erase". 2008-09-18 23:04:18 +00:00
DeadStoreElimination.cpp Factorize code: remove variants of "strip off 2008-10-01 15:25:41 +00:00
GVN.cpp fix memleak by cleaning the global sets on pass exit 2008-10-10 16:25:50 +00:00
GVNPRE.cpp Tidy up several unbeseeming casts from pointer to intptr_t. 2008-09-04 17:05:41 +00:00
IndVarSimplify.cpp Revert r60042. IndVarSimplify should check if APFloat is PPCDoubleDouble first before trying to convert it to an integer. 2008-11-26 01:11:57 +00:00
InstructionCombining.cpp reapply Sanjiv's patch to genericize memcpy/memset/memmove to take an 2008-11-21 16:42:48 +00:00
JumpThreading.cpp Tidy up several unbeseeming casts from pointer to intptr_t. 2008-09-04 17:05:41 +00:00
LICM.cpp Change create*Pass factory functions to return Pass* instead of 2008-10-22 23:32:42 +00:00
LoopDeletion.cpp Change create*Pass factory functions to return Pass* instead of 2008-10-22 23:32:42 +00:00
LoopIndexSplit.cpp If the sign of exit condition and split condition does not match 2008-11-10 19:48:34 +00:00
LoopRotation.cpp Change create*Pass factory functions to return Pass* instead of 2008-10-22 23:32:42 +00:00
LoopStrengthReduce.cpp Change create*Pass factory functions to return Pass* instead of 2008-10-22 23:32:42 +00:00
LoopUnroll.cpp Change create*Pass factory functions to return Pass* instead of 2008-10-22 23:32:42 +00:00
LoopUnswitch.cpp Ignore conditions that are outside the loop. 2008-11-03 19:38:07 +00:00
Makefile remove attribution from lib Makefiles. 2007-12-29 20:09:26 +00:00
MemCpyOptimizer.cpp reapply Sanjiv's patch to genericize memcpy/memset/memmove to take an 2008-11-21 16:42:48 +00:00
PredicateSimplifier.cpp Silence unused variable warnings. 2008-11-21 20:00:59 +00:00
Reassociate.cpp Fix build failure. 2008-11-21 21:00:20 +00:00
Reg2Mem.cpp Tidy up several unbeseeming casts from pointer to intptr_t. 2008-09-04 17:05:41 +00:00
Scalar.cpp C and Objective Caml bindings for mem2reg and reg2mem. 2008-03-20 17:16:03 +00:00
ScalarReplAggregates.cpp Allow SROA of vectors. Removing this caused a 2008-11-04 20:54:03 +00:00
SCCP.cpp Fix unused variable warnings. 2008-11-21 01:52:59 +00:00
SimplifyCFGPass.cpp Large mechanical patch. 2008-09-25 21:00:45 +00:00
SimplifyHalfPowrLibCalls.cpp Add a new pass to simplify specific half_powr function calls. This is 2008-11-04 23:41:45 +00:00
SimplifyLibCalls.cpp reapply Sanjiv's patch to genericize memcpy/memset/memmove to take an 2008-11-21 16:42:48 +00:00
TailDuplication.cpp Tidy up several unbeseeming casts from pointer to intptr_t. 2008-09-04 17:05:41 +00:00
TailRecursionElimination.cpp Tidy up several unbeseeming casts from pointer to intptr_t. 2008-09-04 17:05:41 +00:00