| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 98762
|
|
|
|
|
|
|
|
|
|
| |
pointer and length, and allocate the arrays in ScalarEvolution's
BumpPtrAllocator, so that they get released when their owning
SCEV gets released. SCEVs are immutable, so they don't need to worry
about operand array resizing. This fixes a memory leak reported
in PR6637.
llvm-svn: 98755
|
|
|
|
| |
llvm-svn: 98026
|
|
|
|
| |
llvm-svn: 97865
|
|
|
|
| |
llvm-svn: 97830
|
|
|
|
|
|
| |
of loops.
llvm-svn: 97642
|
|
|
|
| |
llvm-svn: 97639
|
|
|
|
|
|
|
| |
by loop depth and emit loop-invariant subexpressions outside of loops.
This speeds up MultiSource/Applications/viterbi and others.
llvm-svn: 97580
|
|
|
|
|
|
|
| |
emitted after the increment. Make sure the insert position
reflects this. This fixes PR6453.
llvm-svn: 97537
|
|
|
|
| |
llvm-svn: 97453
|
|
|
|
|
|
|
|
| |
case where there are loop-invariant instructions somehow left
inside the loop, and in a position where they won't dominate
the IV increment position.
llvm-svn: 96448
|
|
|
|
|
|
|
| |
and T->isPointerTy(). Convert most instances of the first form to the second form.
Requested by Chris.
llvm-svn: 96344
|
|
|
|
|
|
| |
strict about the requirements.
llvm-svn: 96301
|
|
|
|
|
|
| |
isInteger, we now have isFloatTy and isIntegerTy. Requested by Chris!
llvm-svn: 96223
|
|
|
|
|
|
|
| |
insert location has become an "inserted" instruction since the time
it was saved. If so, advance to the first non-"inserted" instruction.
llvm-svn: 96203
|
|
|
|
|
|
|
|
|
| |
current insertion point, advance the current insertion point.
This avoids a use-before-def situation in a testcase extracted
from clang which is difficult to reduce to a reasonable-sized
regression test.
llvm-svn: 96151
|
|
|
|
| |
llvm-svn: 96007
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
cases, and implement target-independent folding rules for alignof and
offsetof. Also, reassociate reassociative operators when it leads to
more folding.
Generalize ScalarEvolution's isOffsetOf to recognize offsetof on
arrays. Rename getAllocSizeExpr to getSizeOfExpr, and getFieldOffsetExpr
to getOffsetOfExpr, for consistency with analagous ConstantExpr routines.
Make the target-dependent folder promote GEP array indices to
pointer-sized integers, to make implicit casting explicit and exposed
to subsequent folding.
And add a bunch of testcases for this new functionality, and a bunch
of related existing functionality.
llvm-svn: 94987
|
|
|
|
|
|
| |
rather than after.
llvm-svn: 94742
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
use plain SCEVUnknowns with ConstantExpr::getSizeOf and
ConstantExpr::getOffsetOf constants. This eliminates a bunch of
special-case code.
Also add code for pattern-matching these expressions, for clients that
want to recognize them.
Move ScalarEvolution's logic for expanding array and vector sizeof
expressions into an element count times the element size, to expose
the multiplication to subsequent folding, into the regular constant
folder.
llvm-svn: 94737
|
|
|
|
|
|
|
| |
rememberInstruction so that future users of that user will be inserted
in the correct position. This fixes the Darwin selfhost.
llvm-svn: 94070
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 93931
|
|
|
|
| |
llvm-svn: 90511
|
|
|
|
|
|
| |
Patch by Howard Hinnant!
llvm-svn: 90365
|
|
|
|
|
|
|
| |
where the element is of a basic builtin type. For example, to get
an i8* use getInt8PtrTy.
llvm-svn: 83379
|
|
|
|
|
|
|
| |
the operands, rather than trying to partition them into a start
and a step. This handles non-affine add recurrences correctly.
llvm-svn: 83011
|
|
|
|
|
|
|
|
| |
aren't in canonical loop-simplify form, since it doesn't itself depend
on LoopSimplify. This means handling loops without preheaders and loops
with multiple backedges.
llvm-svn: 82905
|
|
|
|
|
|
| |
to inttoptr/ptrtoint unnecessarily.
llvm-svn: 82864
|
|
|
|
| |
llvm-svn: 79533
|
|
|
|
|
|
|
|
| |
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: 78948
|
|
|
|
|
|
|
|
| |
change back are
metadata related, which I'm waiting on to avoid conflicting with Devang.
llvm-svn: 77721
|
|
|
|
| |
llvm-svn: 77494
|
|
|
|
|
|
| |
to a few tests where it is required for the expected transformation.
llvm-svn: 77290
|
|
|
|
|
|
| |
thanks to contexts-on-types. More to come.
llvm-svn: 77011
|
|
|
|
| |
llvm-svn: 76702
|
|
|
|
| |
llvm-svn: 76438
|
|
|
|
|
|
|
|
| |
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: 74918
|
|
|
|
|
|
| |
through the ValueTracking API.
llvm-svn: 74873
|
|
|
|
| |
llvm-svn: 74492
|
|
|
|
| |
llvm-svn: 74391
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This helps it avoid reusing an instruction that doesn't dominate all
of the users, in cases where the original instruction was inserted
before all of the users were known. This may result in redundant
expansions of sub-expressions that depend on loop-unpredictable values
in some cases, however this isn't very common, and it primarily impacts
IndVarSimplify, so GVN can be expected to clean these up.
This eliminates the need for IndVarSimplify's FixUsesBeforeDefs,
which fixes several bugs.
llvm-svn: 74352
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
trip counts in more cases.
Generalize ScalarEvolution's isLoopGuardedByCond code to recognize
And and Or conditions, splitting the code out into an
isNecessaryCond helper function so that it can evaluate Ands and Ors
recursively, and make SCEVExpander be much more aggressive about
hoisting instructions out of loops.
test/CodeGen/X86/pr3495.ll has an additional instruction now, but
it appears to be due to an arbitrary register allocation difference.
llvm-svn: 74048
|
|
|
|
| |
llvm-svn: 73910
|
|
|
|
| |
llvm-svn: 73906
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
failures.
To support this, add some utility functions to Type to help support
vector/scalar-independent code. Change ConstantInt::get and
ConstantFP::get to support vector types, and add an overload to
ConstantInt::get that uses a static IntegerType type, for
convenience.
Introduce a new getConstant method for ScalarEvolution, to simplify
common use cases.
llvm-svn: 73431
|
|
|
|
|
|
| |
SmallVector instead of std::vector.
llvm-svn: 73357
|