| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
sneak in my last checkin.
llvm-svn: 127842
|
|
|
|
|
|
|
|
|
| |
SCEV may generate expressions composed of multiple pointers, which can
lead to invalid GEP expansion. Until we can teach SCEV to follow strict
pointer rules, make sure no bad GEPs creep into IR.
Fixes rdar://problem/9038671.
llvm-svn: 127839
|
|
|
|
| |
llvm-svn: 127837
|
|
|
|
|
|
| |
that have the bit set.
llvm-svn: 123104
|
|
|
|
|
|
|
| |
functions of ScalarEvolution, in preparation for memoization and
other optimizations.
llvm-svn: 119562
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
exposes an initializeMyPassFunction(), which
must be called in the pass's constructor. This function uses static dependency declarations to recursively initialize
the pass's dependencies.
Clients that only create passes through the createFooPass() APIs will require no changes. Clients that want to use the
CommandLine options for passes will need to manually call the appropriate initialization functions in PassInitialization.h
before parsing commandline arguments.
I have tested this with all standard configurations of clang and llvm-gcc on Darwin. It is possible that there are problems
with the static dependencies that will only be visible with non-standard options. If you encounter any crash in pass
registration/creation, please send the testcase to me directly.
llvm-svn: 116820
|
|
|
|
|
|
|
|
|
| |
perform initialization without static constructors AND without explicit initialization
by the client. For the moment, passes are required to initialize both their
(potential) dependencies and any passes they preserve. I hope to be able to relax
the latter requirement in the future.
llvm-svn: 116334
|
|
|
|
| |
llvm-svn: 115996
|
|
|
|
| |
llvm-svn: 114277
|
|
|
|
| |
llvm-svn: 110460
|
|
|
|
| |
llvm-svn: 110410
|
|
|
|
|
|
|
|
| |
address of the static
ID member as the sole unique type identifier. Clean up APIs related to this change.
llvm-svn: 110396
|
|
|
|
| |
llvm-svn: 109103
|
|
|
|
| |
llvm-svn: 109045
|
|
|
|
|
|
|
| |
use getIncomingValueForBlock instead of
LoopInfo::getCanonicalInductionVariableIncrement.
llvm-svn: 108865
|
|
|
|
| |
llvm-svn: 107976
|
|
|
|
|
|
| |
This fixes PR7333.
llvm-svn: 106267
|
|
|
|
|
|
| |
same, now that getConstant has overloads consistent with ConstantInt::get.
llvm-svn: 102965
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
a ScalarEvolution bug with overflow handling is fixed, the normal analysis
code will automatically decline to operate on the icmp instructions which
are responsible for the loop exit.
llvm-svn: 101032
|
|
|
|
|
|
|
|
| |
instead of deleting just the user. This makes it more consistent with
other code in IndVarSimplify, and theoretically can eliminate more users
earlier.
llvm-svn: 101027
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
that it's only testing for the entry condition, not full loop-invariant
conditions.
llvm-svn: 100979
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
explicitly split into stride-and-offset pairs. Also, add the
ability to track multiple post-increment loops on the same expression.
This refines the concept of "normalizing" SCEV expressions used for
to post-increment uses, and introduces a dedicated utility routine for
normalizing and denormalizing expressions.
This fixes the expansion of expressions which are post-increment users
of more than one loop at a time. More broadly, this takes LSR another
step closer to being able to reason about more than one loop at a time.
llvm-svn: 100699
|
|
|
|
|
|
|
|
| |
exits the loop. With this information we can guarantee
the iteration count of the loop is bounded by the
compare. I think this xforms is finally safe now.
llvm-svn: 100285
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
to a signed vs unsigned value depending on the sign of the
constant fp means that we can't distinguish between a
truly negative number and a positive number so large the
32nd bit is set. So, do don't this!
llvm-svn: 100283
|
|
|
|
|
|
| |
stuff. More bugs remain though.
llvm-svn: 100282
|
|
|
|
|
|
|
| |
the required validity checks in the first place, and supporting
a condition large enough to require the 32'nd bit isn't worth it.
llvm-svn: 100280
|
|
|
|
|
|
| |
of llvm.
llvm-svn: 100276
|
|
|
|
|
|
|
| |
no uses, it would have been deleted by
RecursivelyDeleteTriviallyDeadInstructions
llvm-svn: 100275
|
|
|
|
| |
llvm-svn: 100274
|
|
|
|
| |
llvm-svn: 100273
|
|
|
|
| |
llvm-svn: 100272
|
|
|
|
|
|
|
|
|
| |
are in the same block. Insert the new increment in the
correct location.
Also, more cleanups.
llvm-svn: 100271
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 99324
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
so that the SCEVExpander doesn't retain a dangling pointer as its
insert position. The dangling pointer in this case wasn't ever used
to insert new instructions, but it was causing trouble with
SCEVExpander's code for automatically advancing its insert position
past debug intrinsics.
This fixes use-after-free errors that valgrind noticed in
test/Transforms/IndVarSimplify/2007-06-06-DeleteDanglesPtr.ll and
test/Transforms/IndVarSimplify/exit_value_tests.ll.
llvm-svn: 99036
|
|
|
|
| |
llvm-svn: 98584
|
|
|
|
|
|
|
| |
compute a set of reachable blocks for itself each time it is called, which
is fairly frequently.
llvm-svn: 98179
|
|
|
|
| |
llvm-svn: 97453
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 96780
|
|
|
|
| |
llvm-svn: 96771
|
|
|
|
|
|
| |
to be spurious
llvm-svn: 96662
|
|
|
|
| |
llvm-svn: 96653
|