#
ba7f6d82 |
| 18-May-2009 |
Dan Gohman <gohman@apple.com> |
Add an isOne() utility function to ScalarEvolution, similar to isZero() and similar to ConstantInt's isOne().
llvm-svn: 72003
|
#
e712a2f6 |
| 13-May-2009 |
Dan Gohman <gohman@apple.com> |
Add three new helper routines, getNoopOrZeroExtend, getNoopOrSignExtend, and getTruncateOrNoop. These are similar to getTruncateOrZeroExtend etc., except that they assert that the conversion is eithe
Add three new helper routines, getNoopOrZeroExtend, 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
show more ...
|
#
ae451600 |
| 12-May-2009 |
Dan Gohman <gohman@apple.com> |
When forgetting SCEVs for loop PHIs, don't forget SCEVUnknown values. These values aren't analyzable, so they don't care if more information about the loop trip count can be had. Also, SCEVUnknown is
When forgetting SCEVs for loop PHIs, don't forget SCEVUnknown values. 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
show more ...
|
#
d6c04461 |
| 12-May-2009 |
Dan Gohman <gohman@apple.com> |
Fix GetMinTrailingZeros for SCEVSignExtend and SCEVZeroExtendExpr to return the correct value when the cast operand is all zeros. This ought to be pretty rare, because it would mean that the regular
Fix GetMinTrailingZeros for SCEVSignExtend and SCEVZeroExtendExpr to 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
show more ...
|
#
ebf98b02 |
| 09-May-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Allow scalar evolution to compute iteration counts for loops with a pointer-based condition. This fixes PR3171.
llvm-svn: 71354
|
#
af9eaa83 |
| 09-May-2009 |
Duncan Sands <baldrick@free.fr> |
Rename PaddedSize to AllocSize, in the hope that this will make it more obvious what it represents, and stop it being confused with the StoreSize.
llvm-svn: 71349
|
#
30f24fe7 |
| 09-May-2009 |
Dan Gohman <gohman@apple.com> |
Don't attempt to handle unsized types in ScalarEvolution's GEP analyzer.
llvm-svn: 71302
|
#
35dc9b65 |
| 08-May-2009 |
Dan Gohman <gohman@apple.com> |
Fix bogus overflow checks by replacing them with actual overflow checks.
llvm-svn: 71284
|
#
2e55cc5a |
| 08-May-2009 |
Dan Gohman <gohman@apple.com> |
Fold trunc casts into add-recurrence expressions, allowing the add-recurrence to be exposed. Add a new SCEV folding rule to help simplify expressions in the presence of these extra truncs.
llvm-svn:
Fold trunc casts into add-recurrence expressions, allowing the 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
show more ...
|
#
c05bb947 |
| 08-May-2009 |
Dan Gohman <gohman@apple.com> |
Fix another bug in r71252. This code supports GetElementPtr constant exprs as well as instructions.
llvm-svn: 71262
|
#
5122d615 |
| 08-May-2009 |
Dan Gohman <gohman@apple.com> |
Add memoization for getSCEVAtScope results for instructions which are not analyzed with SCEV techniques, which can require brute-forcing through a large number of instructions. This fixes a massive c
Add memoization for getSCEVAtScope results for instructions 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
show more ...
|
#
b81f47d1 |
| 08-May-2009 |
Dan Gohman <gohman@apple.com> |
Make the SCEV* form of getSCEVAtScope public, to allow ScalarEvolution clients to use it.
llvm-svn: 71258
|
#
2173bd3f |
| 08-May-2009 |
Dan Gohman <gohman@apple.com> |
Fix an error from r71252.
llvm-svn: 71255
|
#
ee750d14 |
| 08-May-2009 |
Dan Gohman <gohman@apple.com> |
Factor out the code for creating SCEVs for GEPs into a separate function.
llvm-svn: 71252
|
#
c3a3cb47 |
| 08-May-2009 |
Dan Gohman <gohman@apple.com> |
Implement several new SCEV folding rules for UDiv SCEVs. This fixes an old FIXME, and is needed by some upcoming changes.
llvm-svn: 71247
|
#
64f756b4 |
| 07-May-2009 |
Dan Gohman <gohman@apple.com> |
SCEVComplexityCompare's new code was missing SCEVUDivExpr. Implement the SCEVUDivExpr case.
llvm-svn: 71173
|
#
9ba542c3 |
| 07-May-2009 |
Dan Gohman <gohman@apple.com> |
Make ScalarEvolution's GroupByComplexity more thorough. In addition to sorting SCEVs by their kind, sort SCEVs of the same kind according to their operands. This helps avoid things like (a+b) being a
Make ScalarEvolution's GroupByComplexity more thorough. In addition to sorting SCEVs by their kind, sort SCEVs of the same kind according to their operands. This helps avoid things like (a+b) being a distinct expression from (b+a).
llvm-svn: 71160
show more ...
|
#
4f2e69c2 |
| 07-May-2009 |
Dan Gohman <gohman@apple.com> |
Trim unnecessary headers. Code in Analysis shouldn't use Transforms headers due to library dependencies.
llvm-svn: 71159
|
#
c6bb55ba |
| 07-May-2009 |
Dan Gohman <gohman@apple.com> |
Factor out a common base class between SCEVCommutativeExpr and SCEVAddRecExpr. This eliminates redundant code for visiting all the operands of an expression.
llvm-svn: 71157
|
#
39b480ce |
| 06-May-2009 |
Dan Gohman <gohman@apple.com> |
Use stable_sort instead of plain sort to avoid the risk of generating trivially different code on different hosts (due to differing std::sort implementations).
llvm-svn: 71124
|
#
48f82222 |
| 04-May-2009 |
Dan Gohman <gohman@apple.com> |
Re-apply 70645, converting ScalarEvolution to use CallbackVH, with fixes. allUsesReplacedWith need to walk the def-use chains and invalidate all users of a value that is replaced. SCEVs of users need
Re-apply 70645, converting ScalarEvolution to use CallbackVH, with fixes. allUsesReplacedWith need to walk the def-use chains and invalidate all users of a value that is replaced. SCEVs of users need to be recalcualted even if the new value is equivalent. Also, make forgetLoopPHIs walk def-use chains, since any SCEV that depends on a PHI should be recalculated when more information about that PHI becomes available.
llvm-svn: 70927
show more ...
|
#
fc2a8d1e |
| 04-May-2009 |
Dan Gohman <gohman@apple.com> |
Fix an 80-column violation.
llvm-svn: 70925
|
#
4b56fab9 |
| 04-May-2009 |
Dan Gohman <gohman@apple.com> |
Fix doxygen comment syntax.
llvm-svn: 70924
|
#
a30370bc |
| 04-May-2009 |
Dan Gohman <gohman@apple.com> |
Constify a bunch of SCEV-using code.
llvm-svn: 70919
|
#
5036695c |
| 03-May-2009 |
Dan Gohman <gohman@apple.com> |
Revert r70645 for now; it's causing a variety of regressions.
llvm-svn: 70661
|