| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
sides is CouldNotCompute, the resulting exact count must be CouldNotCompute.
llvm-svn: 73920
|
|
|
|
| |
llvm-svn: 73907
|
|
|
|
| |
llvm-svn: 73906
|
|
|
|
| |
llvm-svn: 73903
|
|
|
|
|
|
|
|
|
|
|
| |
tables attached to the ScalarEvolution pass.
This also throws out the SCEV reference counting scheme, as the the SCEVs now have a lifetime controlled by the
ScalarEvolution pass.
Note that SCEVHandle is now a no-op, and will be remove in a future commit.
llvm-svn: 73892
|
|
|
|
|
|
|
|
|
|
|
|
| |
counts for loops with multiple exits, replacing more conservative code
which only handled constants. This is derived from a patch by
Nick Lewycky.
This also fixes llc aborts in ClamAV and others, as
getUMinFromMismatchedTypes takes care of balancing the types before
working with them.
llvm-svn: 73884
|
|
|
|
| |
llvm-svn: 73883
|
|
|
|
|
|
| |
helper functions. Based on a patch by Nick Lewycky.
llvm-svn: 73869
|
|
|
|
|
|
|
|
|
| |
blocks, and also exit blocks with multiple conditions (combined
with (bitwise) ands and ors). It's often infeasible to compute an
exact trip count in such cases, but a useful upper bound can often
be found.
llvm-svn: 73866
|
|
|
|
| |
llvm-svn: 73865
|
|
|
|
|
|
|
|
| |
overflow when computing a integer division to round up.
Thanks to Nick Lewycky for noticing this!
llvm-svn: 73862
|
|
|
|
|
|
|
|
|
|
| |
SCEVUnknowns with identical Instructions to be equal. This allows
it to analze cases such as the attached testcase, where the front-end
has cloned the loop controlling expression. Along with r73805, this
lets IndVarSimplify eliminate all the sign-extend casts in the
loop in the attached testcase.
llvm-svn: 73807
|
|
|
|
|
|
|
| |
in the loop backedge-taken count computation of the maximum
possible trip count.
llvm-svn: 73805
|
|
|
|
|
|
|
|
|
|
|
| |
so that it can access the TargetData member (when available) and
use ValueTracking.h information to compute information for
SCEVUnknown Values.
Also add GetMinLeadingZeros and GetMinSignBits functions,
with minimal implementations.
llvm-svn: 73794
|
|
|
|
|
|
| |
expressions, when interesting.
llvm-svn: 73776
|
|
|
|
|
|
| |
uniquing tables. No functionality change.
llvm-svn: 73728
|
|
|
|
|
|
|
| |
comparisons were recognized for umax, but instcombine canonicalizes
unsigned comparisons with zero to this simpler form.
llvm-svn: 73717
|
|
|
|
| |
llvm-svn: 73704
|
|
|
|
| |
llvm-svn: 73666
|
|
|
|
|
|
|
| |
If C is a single bit and the and gets analyzed as a truncate and
zero-extend, the xor can be represnted as an add.
llvm-svn: 73664
|
|
|
|
| |
llvm-svn: 73663
|
|
|
|
|
|
|
| |
that gets recognized with a SCEVZeroExtendExpr must be an And
with a low-bits mask. With r73540, this is no longer the case.
llvm-svn: 73594
|
|
|
|
|
|
|
|
| |
obscuring what would otherwise be a low-bits mask. Use ComputeMaskedBits
to compute what ShrinkDemandedConstant knew about to reconstruct a
low-bits mask value.
llvm-svn: 73540
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
they contain multiplications of constants with add operations.
This helps simplify several kinds of things; in particular it
helps simplify expressions like ((-1 * (%a + %b)) + %a) to %b,
as expressions like this often come up in loop trip count
computations.
llvm-svn: 73361
|
|
|
|
|
|
| |
the potentially expensive erase.
llvm-svn: 73359
|
|
|
|
|
|
|
|
| |
even though the order doesn't matter at the top level of an expression,
it does matter when the constant is a subexpression of an n-ary
expression, because n-ary expressions are sorted lexicographically.
llvm-svn: 73358
|
|
|
|
|
|
| |
SmallVector instead of std::vector.
llvm-svn: 73357
|
|
|
|
|
|
| |
extension with unspecified bits.
llvm-svn: 73293
|
|
|
|
|
|
| |
SCEVCouldNotCompute, and not SCEVUnknown.
llvm-svn: 72999
|
|
|
|
| |
llvm-svn: 72970
|
|
|
|
| |
llvm-svn: 72948
|
|
|
|
|
|
|
|
| |
that of the LHS. It doesn't matter for correctness, but the LHS
is more likely than the RHS to be a pointer type in exotic cases,
and it's more tidy to have it return the integer type.
llvm-svn: 72424
|
|
|
|
| |
llvm-svn: 72376
|
|
|
|
|
|
|
|
| |
in the case where a loop exit value cannot be computed, instead of only in
some cases while using SCEVCouldNotCompute in others. This simplifies
getSCEVAtScope's callers.
llvm-svn: 72375
|
|
|
|
|
|
|
| |
about the convention from LoopInfo that a null Loop* means the entire
function body.
llvm-svn: 72152
|
|
|
|
|
|
| |
it's an implementation detail.
llvm-svn: 72122
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
instructions. It attempts to create high-level multi-operand GEPs,
though in cases where this isn't possible it falls back to casting
the pointer to i8* and emitting a GEP with that. Using GEP instructions
instead of ptrtoint+arithmetic+inttoptr helps pointer analyses that
don't use ScalarEvolution, such as BasicAliasAnalysis.
Also, make the AddrModeMatcher more aggressive in handling GEPs.
Previously it assumed that operand 0 of a GEP would require a register
in almost all cases. It now does extra checking and can do more
matching if operand 0 of the GEP is foldable. This fixes a problem
that was exposed by SCEVExpander using GEPs.
llvm-svn: 72093
|
|
|
|
| |
llvm-svn: 72011
|
|
|
|
|
|
| |
bits have been stripped out by instcombine.
llvm-svn: 72010
|
|
|
|
| |
llvm-svn: 72009
|
|
|
|
|
|
|
| |
consistency with other routines that use a null Loop* to mean code
not contained by any loop.
llvm-svn: 72008
|
|
|
|
|
|
| |
instead of within their controlling expressions.
llvm-svn: 72007
|
|
|
|
|
|
| |
type mismatches.
llvm-svn: 72006
|
|
|
|
|
|
| |
entering a loop is a non-split critical edge.
llvm-svn: 72004
|
|
|
|
|
|
| |
and similar to ConstantInt's isOne().
llvm-svn: 72003
|
|
|
|
|
|
|
|
|
| |
getNoopOrSignExtend, and getTruncateOrNoop. These are similar
to getTruncateOrZeroExtend etc., except that they assert that
the conversion is either not widening or narrowing, as
appropriate. These will be used in some upcoming fixes.
llvm-svn: 71632
|
|
|
|
|
|
|
|
|
| |
These values aren't analyzable, so they don't care if more information
about the loop trip count can be had. Also, SCEVUnknown is used for
a PHI while the PHI itself is being analyzed, so it needs to be left
in the Scalars map. This fixes a variety of subtle issues.
llvm-svn: 71533
|
|
|
|
|
|
|
|
|
|
| |
return the correct value when the cast operand is all zeros. This ought
to be pretty rare, because it would mean that the regular SCEV folding
routines missed a case, though there are cases they might legitimately
miss. Also, it's unlikely anything currently using GetMinTrailingZeros
cares about this case.
llvm-svn: 71532
|
|
|
|
|
|
| |
pointer-based condition. This fixes PR3171.
llvm-svn: 71354
|