llvm-6502/lib
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
..
Analysis Teach IndVarSimplify to optimize code using the C "int" type for 2009-02-12 22:19:27 +00:00
Archive
AsmParser
Bitcode Add suppport for ConstantExprs of shufflevectors whose result type is not equal to the 2009-02-12 21:28:33 +00:00
CodeGen Arrange to print constants that match "n" and "i" constraints 2009-02-12 20:58:09 +00:00
Debugger
ExecutionEngine Split the locking out of JIT::runJITOnFunction so that callers 2009-02-06 21:25:08 +00:00
Linker
Support
System Fix MingW build, patch by Kenneth Boyd! 2009-02-12 07:39:10 +00:00
Target Arrange to print constants that match "n" and "i" constraints 2009-02-12 20:58:09 +00:00
Transforms Teach IndVarSimplify to optimize code using the C "int" type for 2009-02-12 22:19:27 +00:00
VMCore Add suppport for ConstantExprs of shufflevectors whose result type is not equal to the 2009-02-12 21:28:33 +00:00
Makefile Removed trailing whitespace from Makefiles. 2009-01-09 16:44:42 +00:00