| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
headers due to library dependencies.
llvm-svn: 71159
|
|
|
|
|
|
|
| |
SCEVAddRecExpr. This eliminates redundant code for visiting
all the operands of an expression.
llvm-svn: 71157
|
|
|
|
|
|
|
| |
trivially different code on different hosts (due to differing
std::sort implementations).
llvm-svn: 71124
|
|
|
|
|
|
|
|
|
|
|
|
| |
CallbackVH, with fixes. allUsesReplacedWith need to
walk the def-use chains and invalidate all users of a
value that is replaced. SCEVs of users need to be
recalcualted even if the new value is equivalent. Also,
make forgetLoopPHIs walk def-use chains, since any
SCEV that depends on a PHI should be recalculated when
more information about that PHI becomes available.
llvm-svn: 70927
|
|
|
|
| |
llvm-svn: 70925
|
|
|
|
| |
llvm-svn: 70924
|
|
|
|
| |
llvm-svn: 70919
|
|
|
|
| |
llvm-svn: 70661
|
|
|
|
|
|
|
|
|
| |
makes ScalarEvolution::deleteValueFromRecords, and it's code that
subtly needed to be called before ReplaceAllUsesWith, unnecessary.
It also makes ValueDeletionListener unnecessary.
llvm-svn: 70645
|
|
|
|
|
|
|
| |
it also forget any SCEVs associated with loop-header PHIs in the loop,
as they may be dependent on trip count information.
llvm-svn: 70633
|
|
|
|
|
|
|
|
| |
artificial "ptrtoint", as it tends to clutter up complicated
expressions. The cast operators now print both source and
destination types, which is usually sufficient.
llvm-svn: 70554
|
|
|
|
| |
llvm-svn: 70550
|
|
|
|
|
|
| |
avoids duplicate scevs that differ only in type.
llvm-svn: 70549
|
|
|
|
|
|
| |
gone lost during the pImpl conversion.
llvm-svn: 70536
|
|
|
|
| |
llvm-svn: 70510
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
llvm-svn: 70509
|
|
|
|
|
|
| |
in getSCEVAtScope.
llvm-svn: 70495
|
|
|
|
|
|
| |
a SCEVable type, not just integer types.
llvm-svn: 70463
|
|
|
|
| |
llvm-svn: 70422
|
|
|
|
|
|
|
|
| |
(sext i8 {-128,+,1} to i64) to i64 {-128,+,1}, where the iteration
crosses from negative to positive, but is still safe if the trip
count is within range.
llvm-svn: 70421
|
|
|
|
|
|
|
| |
print sext, zext, and trunc, instead of signextend, zeroextend,
and truncate, respectively, for consistency with the main IR.
llvm-svn: 70405
|
|
|
|
| |
llvm-svn: 70386
|
|
|
|
| |
llvm-svn: 70357
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
information to simplify [sz]ext({a,+,b}) to {zext(a),+,[zs]ext(b)},
as appropriate.
These functions and the trip count code each call into the other, so
this requires careful handling to avoid infinite recursion. During
the initial trip count computation, conservative SCEVs are used,
which are subsequently discarded once the trip count is actually
known.
Among other benefits, this change lets LSR automatically eliminate
some unnecessary zext-inreg and sext-inreg operation where the
operand is an induction variable.
llvm-svn: 70241
|
|
|
|
| |
llvm-svn: 70176
|
|
|
|
|
|
| |
common, but indvars shouldn't crash on them. This fixes PR4054.
llvm-svn: 70051
|
|
|
|
|
|
| |
whitespace in the same file.
llvm-svn: 69870
|
|
|
|
| |
llvm-svn: 69809
|
|
|
|
|
|
|
| |
practical benefit in the case of ScalarEvolution, and it's otherwise
a nuisance.
llvm-svn: 69749
|
|
|
|
|
|
|
|
| |
type to truncate to should be the number of bits of the value that are
preserved, not the number that are clobbered with sign-extension.
This fixes regressions in ldecod.
llvm-svn: 69704
|
|
|
|
|
|
|
| |
as they appear in LLVM IR. This isn't particularly interesting
on its own; this is just setting up some infrastructure.
llvm-svn: 69655
|
|
|
|
| |
llvm-svn: 69651
|
|
|
|
|
|
| |
and SCEVSignExtendExpr.
llvm-svn: 69649
|
|
|
|
| |
llvm-svn: 69645
|
|
|
|
|
|
| |
the code to minimize dependencies on TargetData.
llvm-svn: 69644
|
|
|
|
| |
llvm-svn: 69643
|
|
|
|
| |
llvm-svn: 69640
|
|
|
|
|
|
| |
instead of allocating and leaking new SCEVCouldNotCompute objects.
llvm-svn: 69452
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 64703
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
code that rounded up and capped the size.
llvm-svn: 62958
|
|
|
|
|
|
| |
Make the debugging dump be a full line.
llvm-svn: 62325
|
|
|
|
|
|
| |
PR3296 and PR3302.
llvm-svn: 62160
|
|
|
|
|
|
| |
inline the only use of isNegative. Fixes warning reported by Mike Stump.
llvm-svn: 61600
|
|
|
|
|
|
| |
pending a correct solution.
llvm-svn: 61589
|