| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
| |
numerator is an induction variable. For example, with code like this:
for (i=0;i<n;++i)
x[i%n] = 0;
IndVarSimplify will now recognize that i is always less than n inside
the loop, and eliminate the remainder.
llvm-svn: 101113
|
|
|
|
|
|
|
|
|
|
|
|
| |
expression is a UDiv and it doesn't appear that the UDiv came from
the user's source.
ScalarEvolution has recently figured out how to compute a tripcount
expression for the inner loop in
SingleSource/Benchmarks/Shootout/sieve.c, using a udiv. Emitting a
udiv instruction dramatically slows down the enclosing loop.
llvm-svn: 101068
|
|
|
|
|
|
|
|
| |
the loop exit test. This usually doesn't come up for a variety of
reasons, but it isn't impossible, so make IndVarSimplify handle it
conservatively.
llvm-svn: 101008
|
|
|
|
| |
llvm-svn: 101002
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
variables. For example, with code like this:
for (i=0;i<n;++i)
if (i<n)
x[i] = 0;
IndVarSimplify will now recognize that i is always less than n inside
the loop, and eliminate the if.
llvm-svn: 101000
|
|
|
|
| |
llvm-svn: 100705
|
|
|
|
|
|
|
|
|
|
|
|
| |
checker. Amusingly, we already had tests that we should
have rejects because they would be miscompiled in the
testsuite.
The remaining issue with this is that we don't check that
the branch causes us to exit the loop if it fails, so we
don't actually know if we remain in bounds.
llvm-svn: 100284
|
|
|
|
|
|
| |
stuff. More bugs remain though.
llvm-svn: 100282
|
|
|
|
| |
llvm-svn: 100281
|
|
|
|
| |
llvm-svn: 100279
|
|
|
|
| |
llvm-svn: 100278
|
|
|
|
| |
llvm-svn: 100277
|
|
|
|
|
|
|
|
| |
this cleans up a bunch of code and also fixes several crashes and
miscompiles. More to come unfortunately, this optimization
is quite broken.
llvm-svn: 100270
|
|
|
|
|
|
| |
it can't currently observe such changes automatically.
llvm-svn: 100186
|
|
|
|
|
|
|
|
|
|
|
|
| |
which branch on undef to branch on a boolean constant for the edge
exiting the loop. This helps ScalarEvolution compute trip counts for
loops.
Teach ScalarEvolution to recognize single-value PHIs, when safe, and
ForgetSymbolicName to forget such single-value PHI nodes as apprpriate
in ForgetSymbolicName.
llvm-svn: 97126
|
|
|
|
|
|
|
|
| |
true or false as its exit condition. These are usually eliminated by
SimplifyCFG, but the may be left around during a pass which wishes
to preserve the CFG.
llvm-svn: 96683
|
|
|
|
|
|
|
|
|
|
| |
bug fixes, and with improved heuristics for analyzing foreign-loop
addrecs.
This change also flattens IVUsers, eliminating the stride-oriented
groupings, which makes it easier to work with.
llvm-svn: 95975
|
|
|
|
| |
llvm-svn: 94574
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This new version is much more aggressive about doing "full" reduction in
cases where it reduces register pressure, and also more aggressive about
rewriting induction variables to count down (or up) to zero when doing so
reduces register pressure.
It currently uses fairly simplistic algorithms for finding reuse
opportunities, but it introduces a new framework allows it to combine
multiple strategies at once to form hybrid solutions, instead of doing
all full-reduction or all base+index.
llvm-svn: 94061
|
|
|
|
|
|
| |
so that unnamed blocks are handled.
llvm-svn: 93059
|
|
|
|
|
|
|
| |
test/CodeGen/X86, as doesn't use -indvars, and it does use
llc -march=x86-64.
llvm-svn: 92799
|
|
|
|
|
|
| |
avoid spurious failures. This fixes PR5758.
llvm-svn: 91147
|
|
|
|
|
|
| |
depend on target data to supply it within the test
llvm-svn: 85900
|
|
|
|
| |
llvm-svn: 83012
|
|
|
|
|
|
| |
to inttoptr/ptrtoint unnecessarily.
llvm-svn: 82864
|
|
|
|
|
|
|
|
| |
input filename so that opt doesn't print the input filename in the
output so that grep lines in the tests don't unintentionally match
strings in the input filename.
llvm-svn: 81537
|
|
|
|
|
|
| |
filename in the output, which interferes with the tests' grep lines.
llvm-svn: 81263
|
|
|
|
| |
llvm-svn: 81261
|
|
|
|
| |
llvm-svn: 81257
|
|
|
|
|
|
| |
of using llvm-as, now that opt supports this.
llvm-svn: 81226
|
|
|
|
|
|
|
| |
- I'd appreciate it if someone else eyeballs my changes to make sure I captured
the intent of the test.
llvm-svn: 81083
|
|
|
|
|
|
|
|
| |
sinking code, since they are special. If the loop preheader happens
to be the entry block of a function, don't sink static allocas
out of it. This fixes PR4775.
llvm-svn: 80010
|
|
|
|
|
|
|
|
| |
TargetData is not present. It still uses TargetData when available.
This generalization also fixed some limitations in the TargetData
case; the attached testcase covers this.
llvm-svn: 79344
|
|
|
|
| |
llvm-svn: 76492
|
|
|
|
|
|
|
|
|
|
|
|
| |
Getelementptrs that are defined to wrap are virtually useless to
optimization, and getelementptrs that are undefined on any kind
of overflow are too restrictive -- it's difficult to ensure that
all intermediate addresses are within bounds. I'm going to take
a different approach.
Remove a few optimizations that depended on this flag.
llvm-svn: 76437
|
|
|
|
|
|
|
| |
analysis. This allows indvars to emit a simpler loop trip count
expression.
llvm-svn: 76085
|
|
|
|
|
|
| |
using it.
llvm-svn: 75852
|
|
|
|
|
|
|
|
| |
the operands have pointer type, so that the resulting type matches
the original SCEV type, and so that unnecessary ptrtoints are
avoided in common cases.
llvm-svn: 75680
|
|
|
|
| |
llvm-svn: 75644
|
|
|
|
|
|
| |
function.
llvm-svn: 75584
|
|
|
|
|
|
| |
block has a single unique exiting block.
llvm-svn: 75579
|
|
|
|
|
|
|
| |
check for avoiding re-analyzing a widening cast needed to happen
earlier, as getSCEV itself may result in a isLoopGuardedByCond query.
llvm-svn: 75511
|
|
|
|
| |
llvm-svn: 75384
|
|
|
|
|
|
|
| |
of loops. Add several new functions to for working with ScalarEvolution's
add-hoc value-range analysis functionality.
llvm-svn: 75252
|
|
|
|
|
|
|
|
| |
an individual exhaustive evaluation reflects only the exit value
implied by an individual exit, which may differ from the actual
exit value of the loop if there are other exits. This fixes PR4477.
llvm-svn: 74447
|
|
|
|
|
|
|
|
| |
inserted to replace that value must dominate all of of the basic
blocks associated with the uses of the value in the PHI, not just
one of them.
llvm-svn: 74376
|
|
|
|
| |
llvm-svn: 74353
|
|
|
|
|
|
|
|
|
| |
computations in loops with multiple exits.
Adjust the testcase for PR4436 so that the relevant portion isn't
optimized away.
llvm-svn: 74073
|
|
|
|
|
|
|
|
| |
terminator, instead of after the last phi. This fixes a bug
exposed by ScalarEvolution analyzing more kinds of loops.
This fixes PR4436.
llvm-svn: 74072
|
|
|
|
|
|
|
|
| |
overflow when computing a integer division to round up.
Thanks to Nick Lewycky for noticing this!
llvm-svn: 73862
|