llvm/lib/Analysis
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
..
IPA Clear the cached cost when removing a function in 2009-03-19 18:03:56 +00:00
AliasAnalysis.cpp Generalize some alias analysis logic from atomic 2009-02-14 10:56:35 +00:00
AliasAnalysisCounter.cpp
AliasAnalysisEvaluator.cpp simplify logic and get rid of the assumption that operand 0 is the callee 2009-03-24 19:28:39 +00:00
AliasDebugger.cpp Refactor my previous change to maintain the distinction between AliasAnalysis and BasicAliasAnalysis. This involves some wider changes because it 2009-02-05 23:36:27 +00:00
AliasSetTracker.cpp getEntryFor() may invalidate DenseMap iterator. 2009-03-30 18:34:47 +00:00
Analysis.cpp
BasicAliasAnalysis.cpp Rename PaddedSize to AllocSize, in the hope that this 2009-05-09 07:06:46 +00:00
CaptureTracking.cpp Revert r70876 and add a testcase (@c7) showing the problem: 2009-05-07 18:08:34 +00:00
CFGPrinter.cpp
CMakeLists.txt Fix the Win32 VS2008 build: 2009-03-19 23:26:52 +00:00
ConstantFolding.cpp Rename PaddedSize to AllocSize, in the hope that this 2009-05-09 07:06:46 +00:00
DbgInfoPrinter.cpp Oops...I committed too much. 2009-03-13 04:39:26 +00:00
DebugInfo.cpp Print out nicer dump info for DIDescriptor. 2009-05-08 20:28:06 +00:00
InstCount.cpp
Interval.cpp
IntervalPartition.cpp
IVUsers.cpp Factor the code for collecting IV users out of LSR into an IVUsers class, 2009-05-12 02:17:14 +00:00
LibCallAliasAnalysis.cpp
LibCallSemantics.cpp
LiveValues.cpp Enhance LiveValues to work on PHI operands. 2009-03-23 15:49:37 +00:00
LoopInfo.cpp Change the description string of the LoopInfo pass. 2009-05-01 21:58:05 +00:00
LoopPass.cpp Before deleting a basic block, give other loop passes a chance cleanup analysis values, related to the instructions in the basic block. 2009-03-25 23:57:48 +00:00
LoopVR.cpp More const qualifiers. 2009-04-18 17:57:20 +00:00
Makefile
MemoryDependenceAnalysis.cpp now that you can put a PointerIntPair in a SmallPtrSet, remove some 2009-03-29 00:24:04 +00:00
PostDominators.cpp
ProfileInfo.cpp
ProfileInfoLoader.cpp
ProfileInfoLoaderPass.cpp
ScalarEvolution.cpp When forgetting SCEVs for loop PHIs, don't forget SCEVUnknown values. 2009-05-12 01:27:58 +00:00
ScalarEvolutionExpander.cpp Actually insert inserted instructions into the InsertedValues map. 2009-05-01 17:13:31 +00:00
SparsePropagation.cpp Make Print callable from a pass's print method: add const qualifier. No 2009-03-11 20:50:17 +00:00
Trace.cpp
ValueTracking.cpp Rename PaddedSize to AllocSize, in the hope that this 2009-05-09 07:06:46 +00:00