llvm-6502/lib/Transforms/Scalar
Dan Gohman 81db61a2e6 Factor the code for collecting IV users out of LSR into an IVUsers class,
and generalize it so that it can be used by IndVarSimplify. Implement the
base IndVarSimplify transformation code using IVUsers. This removes
TestOrigIVForWrap and associated code, as ScalarEvolution now has enough
builtin overflow detection and folding logic to handle all the same cases,
and more. Run "opt -iv-users -analyze -disable-output" on your favorite
loop for an example of what IVUsers does.

This lets IndVarSimplify eliminate IV casts and compute trip counts in
more cases. Also, this happens to finally fix the remaining testcases
in PR1301.

Now that IndVarSimplify is being more aggressive, it occasionally runs
into the problem where ScalarEvolutionExpander's code for avoiding
duplicate expansions makes it difficult to ensure that all expanded
instructions dominate all the instructions that will use them. As a
temporary measure, IndVarSimplify now uses a FixUsesBeforeDefs function
to fix up instructions inserted by SCEVExpander. Fortunately, this code
is contained, and can be easily removed once a more comprehensive
solution is available.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71535 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-12 02:17:14 +00:00
..
ADCE.cpp Allow readonly functions to unwind exceptions. Teach 2009-05-06 06:49:50 +00:00
BasicBlockPlacement.cpp
CMakeLists.txt
CodeGenPrepare.cpp Restore minor deletion. 2009-05-04 18:40:41 +00:00
CondPropagate.cpp Avoid making the transformation enabled by my last patch if the new destinations have phi nodes. 2009-04-15 00:43:54 +00:00
ConstantProp.cpp
DCE.cpp Eliminate several more unnecessary intptr_t casts. 2009-02-18 05:09:16 +00:00
DeadStoreElimination.cpp Rename PaddedSize to AllocSize, in the hope that this 2009-05-09 07:06:46 +00:00
GVN.cpp Allow readonly functions to unwind exceptions. Teach 2009-05-06 06:49:50 +00:00
GVNPRE.cpp
IndVarSimplify.cpp Factor the code for collecting IV users out of LSR into an IVUsers class, 2009-05-12 02:17:14 +00:00
InstructionCombining.cpp Rename PaddedSize to AllocSize, in the hope that this 2009-05-09 07:06:46 +00:00
JumpThreading.cpp Restore minor deletion. 2009-05-04 18:40:41 +00:00
LICM.cpp Revert r67798: it breaks llvm-gcc bootstrap on x86-64-linux, presumably due to 2009-03-27 14:56:47 +00:00
LoopDeletion.cpp Allow readonly functions to unwind exceptions. Teach 2009-05-06 06:49:50 +00:00
LoopIndexSplit.cpp Allow readonly functions to unwind exceptions. Teach 2009-05-06 06:49:50 +00:00
LoopRotation.cpp Do not count DbgInfoIntrinsic while estimating loop header size. 2009-03-06 03:51:30 +00:00
LoopStrengthReduce.cpp Factor the code for collecting IV users out of LSR into an IVUsers class, 2009-05-12 02:17:14 +00:00
LoopUnroll.cpp Adjust loop size estimate for full unrolling; 2009-04-20 22:19:33 +00:00
LoopUnswitch.cpp Allow readonly functions to unwind exceptions. Teach 2009-05-06 06:49:50 +00:00
Makefile Removed trailing whitespace from Makefiles. 2009-01-09 16:44:42 +00:00
MemCpyOptimizer.cpp Rename PaddedSize to AllocSize, in the hope that this 2009-05-09 07:06:46 +00:00
PredicateSimplifier.cpp
Reassociate.cpp Make the key of ValueRankMap an AssertingVH, so that we die violently 2009-03-31 22:13:29 +00:00
Reg2Mem.cpp
Scalar.cpp add a bunch more passes to the C bindings (PR3734), patch by 2009-03-06 16:52:18 +00:00
ScalarReplAggregates.cpp Rename PaddedSize to AllocSize, in the hope that this 2009-05-09 07:06:46 +00:00
SCCP.cpp Factorize out a concept - no functionality change. 2009-03-21 21:27:31 +00:00
SimplifyCFGPass.cpp Revert r66920. It was causing failures in the self-hosting buildbot (in release 2009-03-13 21:15:59 +00:00
SimplifyHalfPowrLibCalls.cpp eliminate warning when asserts disabled. 2008-12-14 21:36:23 +00:00
SimplifyLibCalls.cpp "There was a typo in my previous patch which leads to miscompilation of 2009-04-12 18:22:33 +00:00
TailDuplication.cpp Allow readonly functions to unwind exceptions. Teach 2009-05-06 06:49:50 +00:00
TailRecursionElimination.cpp Allow readonly functions to unwind exceptions. Teach 2009-05-06 06:49:50 +00:00