llvm-6502/lib/Analysis
Dan Gohman c2390b14c9 Teach IndVarSimplify to optimize code using the C "int" type for
loop induction on LP64 targets. When the induction variable is
used in addressing, IndVars now is usually able to inserst a
64-bit induction variable and eliminates the sign-extending cast.
This is also useful for code using C "short" types for
induction variables on targets with 32-bit addressing.

Inserting a wider induction variable is easy; the tricky part is
determining when trunc(sext(i)) expressions are no-ops. This
requires range analysis of the loop trip count. A common case is
when the original loop iteration starts at 0 and exits when the
induction variable is signed-less-than a fixed value; this case
is now handled.

This replaces IndVarSimplify's OptimizeCanonicalIVType. It was
doing the same optimization, but it was limited to loops with
constant trip counts, because it was running after the loop
rewrite, and the information about the original induction
variable is lost by that point.

Rename ScalarEvolution's executesAtLeastOnce to
isLoopGuardedByCond, generalize it to be able to test for
ICMP_NE conditions, and move it to be a public function so that
IndVars can use it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64407 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-12 22:19:27 +00:00
..
IPA Revert r64300 and r64301. These were causing the following errors respectively: 2009-02-11 18:19:24 +00:00
AliasAnalysis.cpp Fix a crasher: we need to check that the function is non-null before using it! 2009-02-06 00:13:43 +00:00
AliasAnalysisCounter.cpp
AliasAnalysisEvaluator.cpp
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
Analysis.cpp
BasicAliasAnalysis.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
CaptureTracking.cpp BasicAliasAnalysis and FunctionAttrs were both 2009-01-18 12:19:30 +00:00
CFGPrinter.cpp
CMakeLists.txt Fix PR3415 (infinite loop in EscapeAnalysis) by 2009-01-28 11:33:59 +00:00
ConstantFolding.cpp Rename getABITypeSize to getTypePaddedSize, as 2009-01-12 20:38:59 +00:00
DbgInfoPrinter.cpp
DebugInfo.cpp Each input file is encoded as a separate compile unit in LLVM debugging 2009-01-30 18:20:31 +00:00
InstCount.cpp
Interval.cpp
IntervalPartition.cpp
LibCallAliasAnalysis.cpp
LibCallSemantics.cpp
LoopInfo.cpp Remove dead comments. 2008-12-18 09:01:18 +00:00
LoopPass.cpp
LoopVR.cpp
Makefile Removed trailing whitespace from Makefiles. 2009-01-09 16:44:42 +00:00
MemoryDependenceAnalysis.cpp fix two more cases where we could let the NLPDI cache get unsorted. 2009-01-23 07:12:16 +00:00
PostDominators.cpp
ProfileInfo.cpp
ProfileInfoLoader.cpp Tidy up #includes, deleting a bunch of unnecessary #includes. 2009-01-05 17:59:02 +00:00
ProfileInfoLoaderPass.cpp
ScalarEvolution.cpp Teach IndVarSimplify to optimize code using the C "int" type for 2009-02-12 22:19:27 +00:00
ScalarEvolutionExpander.cpp Wind SCEV back in time, to Nov 18th. This 'fixes' PR3275, PR3294, PR3295, 2009-01-13 09:18:58 +00:00
SparsePropagation.cpp
Trace.cpp
ValueTracking.cpp Eliminate use of uint32_t to improve compatibility with cygwin 2009-01-20 18:22:57 +00:00