[llvm-commits] [llvm] r70509 - in /llvm/trunk: include/llvm/Analysis/ScalarEvolution.h lib/Analysis/ScalarEvolution.cpp test/Analysis/ScalarEvolution/2008-11-18-Stride1.ll test/Analysis/ScalarEvolution/max-trip-count.ll test/Analysis/ScalarEvolution/trip-count3.ll
Chris Lattner
clattner at apple.com
Sat May 2 12:21:48 PDT 2009
On Apr 30, 2009, at 1:47 PM, Dan Gohman wrote:
> Author: djg
> Date: Thu Apr 30 15:47:05 2009
> New Revision: 70509
>
> URL: http://llvm.org/viewvc/llvm-project?rev=70509&view=rev
> Log:
> Extend ScalarEvolution's getBackedgeTakenCount to be able to
> compute an upper-bound value for the trip count, in addition to
> the actual trip count. Use this to allow getZeroExtendExpr and
> getSignExtendExpr to fold casts in more cases.
>
> This may eventually morph into a more general value-range
> analysis capability; there are certainly plenty of places where
> more complete value-range information would allow more folding.
Very cool. Can this also be used to handle things like:
int A[20000];
...
for (i = 0; i < N; ++i)
A[i];
...
Knowing that A has a max value of 19999?
-Chris
More information about the llvm-commits
mailing list