| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
llvm-svn: 72453
|
| |
|
|
|
|
|
|
|
|
|
|
| |
possible. For example, it now emits
%p.2.ip.1 = getelementptr [3 x [3 x double]]* %p, i64 2, i64 %tmp, i64 1
instead of the equivalent but less obvious
%p.2.ip.1 = getelementptr [3 x [3 x double]]* %p, i64 0, i64 %tmp, i64 19
llvm-svn: 72452
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
beyond their associated static array type.
I believe that this fixes a legitimate bug, because BasicAliasAnalysis
already has code to check for this condition that works for non-constant
indices, however it was missing the case of constant indices. With this
change, it checks for both.
This fixes PR4267, and miscompiles of SPEC 188.ammp and 464.h264.href.
llvm-svn: 72451
|
| |
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
division operation, don't attempt to use the operation's value as
the base of a getelementptr. This fixes PR4271.
llvm-svn: 72422
|
| |
|
|
|
|
|
| |
low-level alias() method, allowing it to reason more aggressively
about pointers into constant memory. PR4189
llvm-svn: 72403
|
| |
|
|
| |
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
|
| |
|
|
|
|
| |
Also fix 80 column violation.
llvm-svn: 72371
|
| |
|
|
|
|
| |
Use &Ops[0] instead, which is safe since Ops will never be empty here.
llvm-svn: 72368
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
sending SCEVUnknowns to expandAddToGEP. This avoids the need for
expandAddToGEP to bend the rules and peek into SCEVUnknown
expressions.
Factor out the code for testing whether a SCEV can be factored by
a constant for use in a GEP index. This allows it to handle
SCEVAddRecExprs, by recursing.
As a result, SCEVExpander can now put more things in GEP indices,
so it emits fewer explicit mul instructions.
llvm-svn: 72366
|
| |
|
|
|
|
| |
of low bits of the other operand are preserved in the output.
llvm-svn: 72365
|
| |
|
|
|
|
|
|
|
|
|
| |
they are trivially dead.
Fix by clearing the rewriter cache before deleting the trivially dead
instructions.
Also make InsertedExpressions use an AssertingVH to catch these
bugs easier.
llvm-svn: 72364
|
| |
|
|
|
|
|
| |
use in expanding SCEVAddExprs with GEPs. The operands of a
SCEVMulExpr need to be multiplied together, not added.
llvm-svn: 72250
|
| |
|
|
| |
llvm-svn: 72210
|
| |
|
|
|
|
|
|
| |
Instcombine to be more aggressive about using SimplifyDemandedBits
on shift nodes. This allows a shift to be simplified to zero in the
included test case.
llvm-svn: 72204
|
| |
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
MultiSource/Benchmarks/Prolangs-C/football and a variety of other
failures.
llvm-svn: 72120
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
| |
- Reformatting.
- Use while() instead of do-while().
- Move simple constructors into .h file.
llvm-svn: 71782
|
| |
|
|
|
|
| |
functionality change.
llvm-svn: 71781
|
| |
|
|
|
|
|
|
| |
IVUsers.cpp: In member function ‘bool llvm::IVUsers::AddUsersIfInteresting(llvm::Instruction*)’:
IVUsers.cpp:221: warning: ‘isSigned’ may be used uninitialized in this function
with gcc-4.3.
llvm-svn: 71654
|
| |
|
|
| |
llvm-svn: 71646
|
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and generalize it so that it can be used by IndVarSimplify. Implement the
base IndVarSimplify transformation code using IVUsers. This removes
TestOrigIVForWrap and associated code, as ScalarEvolution now has enough
builtin overflow detection and folding logic to handle all the same cases,
and more. Run "opt -iv-users -analyze -disable-output" on your favorite
loop for an example of what IVUsers does.
This lets IndVarSimplify eliminate IV casts and compute trip counts in
more cases. Also, this happens to finally fix the remaining testcases
in PR1301.
Now that IndVarSimplify is being more aggressive, it occasionally runs
into the problem where ScalarEvolutionExpander's code for avoiding
duplicate expansions makes it difficult to ensure that all expanded
instructions dominate all the instructions that will use them. As a
temporary measure, IndVarSimplify now uses a FixUsesBeforeDefs function
to fix up instructions inserted by SCEVExpander. Fortunately, this code
is contained, and can be easily removed once a more comprehensive
solution is available.
llvm-svn: 71535
|
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
will make it more obvious what it represents, and stop
it being confused with the StoreSize.
llvm-svn: 71349
|
| |
|
|
| |
llvm-svn: 71302
|
| |
|
|
|
|
| |
overflow checks.
llvm-svn: 71284
|
| |
|
|
|
|
|
| |
add-recurrence to be exposed. Add a new SCEV folding rule to
help simplify expressions in the presence of these extra truncs.
llvm-svn: 71264
|
| |
|
|
|
|
| |
constant exprs as well as instructions.
llvm-svn: 71262
|
| |
|
|
|
|
|
|
|
| |
which are not analyzed with SCEV techniques, which can require
brute-forcing through a large number of instructions. This
fixes a massive compile-time issue on 400.perlbench (in
particular, the loop in MD5Transform).
llvm-svn: 71259
|
| |
|
|
|
|
| |
clients to use it.
llvm-svn: 71258
|
| |
|
|
| |
llvm-svn: 71255
|
| |
|
|
| |
llvm-svn: 71253
|
| |
|
|
|
|
| |
separate function.
llvm-svn: 71252
|
| |
|
|
|
|
| |
This fixes an old FIXME, and is needed by some upcoming changes.
llvm-svn: 71247
|
| |
|
|
|
|
| |
several regressions. The problem due to 71158 is now fixed.
llvm-svn: 71176
|
| |
|
|
|
|
| |
the SCEVUDivExpr case.
llvm-svn: 71173
|