#
49e062fc |
| 21-Apr-2009 |
Dan Gohman <gohman@apple.com> |
Usage getAnalysisToUpdate for TargetData, per PR760.
llvm-svn: 69645
|
#
b397e1a7 |
| 21-Apr-2009 |
Dan Gohman <gohman@apple.com> |
Introduce encapsulation for ScalarEvolution's TargetData object, and refactor the code to minimize dependencies on TargetData.
llvm-svn: 69644
|
#
413e91f4 |
| 21-Apr-2009 |
Dan Gohman <gohman@apple.com> |
Move some assertion checks so they can do more complete checking.
llvm-svn: 69643
|
#
e20f8245 |
| 21-Apr-2009 |
Dan Gohman <gohman@apple.com> |
Convert ScalarEvolution to use raw_ostream instead of OStream.
llvm-svn: 69640
|
#
31efa309 |
| 18-Apr-2009 |
Dan Gohman <gohman@apple.com> |
Add a ScalarEvolution::getCouldNotCompute() function, and use it instead of allocating and leaking new SCEVCouldNotCompute objects.
llvm-svn: 69452
|
#
c1c2ba7a |
| 16-Apr-2009 |
Dan Gohman <gohman@apple.com> |
Fix a bug with inttoptr/ptrtoint casts where the pointer has a different size from the integer, requiring zero extension or truncation. Don't create ZExtInsts with pointer types. This fixes a regress
Fix a bug with inttoptr/ptrtoint casts where the pointer has a different size from the integer, requiring zero extension or truncation. Don't create ZExtInsts with pointer types. This fixes a regression in consumer-jpeg.
llvm-svn: 69307
show more ...
|
#
0a40ad93 |
| 16-Apr-2009 |
Dan Gohman <gohman@apple.com> |
Expand GEPs in ScalarEvolution expressions. SCEV expressions can now have pointer types, though in contrast to C pointer types, SCEV addition is never implicitly scaled. This not only eliminates the
Expand GEPs in ScalarEvolution expressions. SCEV expressions can now have pointer types, though in contrast to C pointer types, SCEV addition is never implicitly scaled. This not only eliminates the need for special code like IndVars' EliminatePointerRecurrence and LSR's own GEP expansion code, it also does a better job because it lets the normal optimizations handle pointer expressions just like integer expressions.
Also, since LLVM IR GEPs can't directly index into multi-dimensional VLAs, moving the GEP analysis out of client code and into the SCEV framework makes it easier for clients to handle multi-dimensional VLAs the same way as other arrays.
Some existing regression tests show improved optimization. test/CodeGen/ARM/2007-03-13-InstrSched.ll in particular improved to the point where if-conversion started kicking in; I turned it off for this test to preserve the intent of the test.
llvm-svn: 69258
show more ...
|
Revision tags: llvmorg-2.5.0 |
|
#
0bddac16 |
| 24-Feb-2009 |
Dan Gohman <gohman@apple.com> |
Rename ScalarEvolution's getIterationCount to getBackedgeTakenCount, to more accurately describe what it does. Expand its doxygen comment to describe what the backedge-taken count is and how it diffe
Rename ScalarEvolution's getIterationCount to getBackedgeTakenCount, to more accurately describe what it does. Expand its doxygen comment to describe what the backedge-taken count is and how it differs from the actual iteration count of the loop. Adjust names and comments in associated code accordingly.
llvm-svn: 65382
show more ...
|
#
8078b8bd |
| 18-Feb-2009 |
Dan Gohman <gohman@apple.com> |
Use a sign-extend instead of a zero-extend when promoting a trip count value when the original loop iteration condition is signed and the canonical induction variable won't undergo signed overflow. T
Use a sign-extend instead of a zero-extend when promoting a trip count value when the original loop iteration condition is signed and the canonical induction variable won't undergo signed overflow. This isn't required for correctness; it just preserves more information about original loop iteration values.
Add a getTruncateOrSignExtend method to ScalarEvolution, following getTruncateOrZeroExtend.
llvm-svn: 64918
show more ...
|
#
43300341 |
| 17-Feb-2009 |
Dan Gohman <gohman@apple.com> |
Add a method to ScalarEvolution for telling it when a loop has been modified in a way that may effect the trip count calculation. Change IndVars to use this method when it rewrites pointer or floatin
Add a method to ScalarEvolution for telling it when a loop has been modified in a way that may effect the trip count calculation. Change IndVars to use this method when it rewrites pointer or floating-point induction variables instead of using a doInitialization method to sneak these changes in before ScalarEvolution has a chance to see the loop. This eliminates the need for LoopPass to depend on ScalarEvolution.
llvm-svn: 64810
show more ...
|
#
161861de |
| 17-Feb-2009 |
Evan Cheng <evan.cheng@apple.com> |
Strengthen the "non-constant stride must dominate loop preheader" check.
llvm-svn: 64703
|
#
eb6be650 |
| 12-Feb-2009 |
Dan Gohman <gohman@apple.com> |
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 ind
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.
llvm-svn: 64407
show more ...
|
#
21add8f9 |
| 25-Jan-2009 |
Nick Lewycky <nicholas@mxc.ca> |
Start generating arbitrary precision integer SCEVs. This removes the temporary code that rounded up and capped the size.
llvm-svn: 62958
|
#
032e6dd3 |
| 16-Jan-2009 |
Nick Lewycky <nicholas@mxc.ca> |
Reinstate r60509 from Dale: Make the debugging dump be a full line.
llvm-svn: 62325
|
#
52348300 |
| 13-Jan-2009 |
Nick Lewycky <nicholas@mxc.ca> |
Wind SCEV back in time, to Nov 18th. This 'fixes' PR3275, PR3294, PR3295, PR3296 and PR3302.
llvm-svn: 62160
|
#
8f375fc2 |
| 03-Jan-2009 |
Nick Lewycky <nicholas@mxc.ca> |
We know it's always a SCEVConstant if it gets here, so just cast it and inline the only use of isNegative. Fixes warning reported by Mike Stump.
llvm-svn: 61600
|
#
380292a5 |
| 02-Jan-2009 |
Nick Lewycky <nicholas@mxc.ca> |
Don't try to analyze this "backward" case. This is overly conservative pending a correct solution.
llvm-svn: 61589
|
#
69c9aa4c |
| 16-Dec-2008 |
Nick Lewycky <nicholas@mxc.ca> |
Generalize support for analyzing loops to include SLE/SGE loop exit conditions and support for non-unit strides with signed exit conditions.
llvm-svn: 61082
|
#
729bf137 |
| 12-Dec-2008 |
Nick Lewycky <nicholas@mxc.ca> |
Revert my re-instated reverted commit, fixes the bootstrap build on x86-64 linux.
llvm-svn: 60951
|
#
6a344e09 |
| 11-Dec-2008 |
Nick Lewycky <nicholas@mxc.ca> |
Sneaky, sneaky: move the -1 to the outside of the SMax. Reinstate the optimization of SGE/SLE with unit stride, now that it works properly.
llvm-svn: 60881
|
#
8f81e4e3 |
| 09-Dec-2008 |
Evan Cheng <evan.cheng@apple.com> |
Back out 60748 for now. It's breaking SPASS, 254.gap, and 464.h264ref.
llvm-svn: 60776
|
#
f545749f |
| 09-Dec-2008 |
Nick Lewycky <nicholas@mxc.ca> |
It's easy to handle SLE/SGE when the loop has a unit stride.
llvm-svn: 60748
|
#
1f6a7b50 |
| 06-Dec-2008 |
Nick Lewycky <nicholas@mxc.ca> |
Minor cleanup. Use dyn_cast, not isa/cast pairs. No functionality change.
llvm-svn: 60623
|
#
941c37c2 |
| 03-Dec-2008 |
Dale Johannesen <dalej@apple.com> |
Make the debugging dump be a full line.
llvm-svn: 60509
|
#
4d9966dd |
| 02-Dec-2008 |
Nick Lewycky <nicholas@mxc.ca> |
Add a new SCEV representing signed division.
llvm-svn: 60407
|