#
d261d271 |
| 24-Jun-2009 |
Dan Gohman <gohman@apple.com> |
Teach GetMinSignBits about SCEVAddExprs.
llvm-svn: 74045
|
#
f436bacb |
| 24-Jun-2009 |
Dan Gohman <gohman@apple.com> |
Move the special cases for constants out of getUnknown and into createSCEV. Also, recognize UndefValue in createSCEV.
Change getIntegerSCEV's comment to avoid mentioning FP types, and re-implement i
Move the special cases for constants out of getUnknown and into createSCEV. Also, recognize UndefValue in createSCEV.
Change getIntegerSCEV's comment to avoid mentioning FP types, and re-implement it in terms of getConstant instead of getUnknown.
llvm-svn: 74041
show more ...
|
#
8d7576e1 |
| 24-Jun-2009 |
Dan Gohman <gohman@apple.com> |
Use ScalarEvolution::getConstant instead of getUnknown to create SCEVConstants. This cleanup is a step toward letting getUnknown be simpler.
llvm-svn: 74037
|
#
6994293b |
| 24-Jun-2009 |
Dan Gohman <gohman@apple.com> |
Include the maximum trip count expression in ScalarEvolution's print output.
llvm-svn: 74035
|
#
18a96bb0 |
| 24-Jun-2009 |
Dan Gohman <gohman@apple.com> |
Add an isAllOnesValue utility function, similar to isZero and isOne.
llvm-svn: 74032
|
#
53efeb0e |
| 22-Jun-2009 |
Dan Gohman <gohman@apple.com> |
Fix a bug in the trip-count computation with And/Or. If either of the sides is CouldNotCompute, the resulting exact count must be CouldNotCompute.
llvm-svn: 73920
|
#
04052ec5 |
| 22-Jun-2009 |
Owen Anderson <resistor@mac.com> |
Remove the parent pointer from SCEV, since it did not end up being needed.
llvm-svn: 73907
|
#
65b6056e |
| 22-Jun-2009 |
Owen Anderson <resistor@mac.com> |
SCEVHandle is no more!
llvm-svn: 73906
|
#
8885b379 |
| 22-Jun-2009 |
Dan Gohman <gohman@apple.com> |
Fix some typos that Duncan noticed.
llvm-svn: 73903
|
#
86837616 |
| 22-Jun-2009 |
Owen Anderson <resistor@mac.com> |
Banish global state from ScalarEvolution! SCEV uniquing is now done by tables attached to the ScalarEvolution pass. This also throws out the SCEV reference counting scheme, as the the SCEVs now have
Banish global state from ScalarEvolution! SCEV uniquing is now done by 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
show more ...
|
#
ed627385 |
| 22-Jun-2009 |
Dan Gohman <gohman@apple.com> |
Make use of getUMinFromMismatchedTypes when computing backedge-taken counts for loops with multiple exits, replacing more conservative code which only handled constants. This is derived from a patch
Make use of getUMinFromMismatchedTypes when computing backedge-taken 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
show more ...
|
#
2bc22305 |
| 22-Jun-2009 |
Dan Gohman <gohman@apple.com> |
Add a getUMinFromMismatchedTypes helper function.
llvm-svn: 73883
|
#
692b4687 |
| 22-Jun-2009 |
Dan Gohman <gohman@apple.com> |
Factor out code for computing umin and smin for SCEV expressions into helper functions. Based on a patch by Nick Lewycky.
llvm-svn: 73869
|
#
96212b66 |
| 22-Jun-2009 |
Dan Gohman <gohman@apple.com> |
Teach ScalarEvolution how to analyze loops with multiple exit blocks, and also exit blocks with multiple conditions (combined with (bitwise) ands and ors). It's often infeasible to compute an exact t
Teach ScalarEvolution how to analyze loops with multiple exit 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
show more ...
|
#
13037149 |
| 22-Jun-2009 |
Dan Gohman <gohman@apple.com> |
Delete an unused variable.
llvm-svn: 73865
|
#
0104842e |
| 21-Jun-2009 |
Dan Gohman <gohman@apple.com> |
Fix ScalarEvolution's backedge-taken count computations to check for overflow when computing a integer division to round up.
Thanks to Nick Lewycky for noticing this!
llvm-svn: 73862
|
#
450f4e0f |
| 20-Jun-2009 |
Dan Gohman <gohman@apple.com> |
Generalize isLoopGuardedByCond's checking to consider two SCEVUnknowns with identical Instructions to be equal. This allows it to analze cases such as the attached testcase, where the front-end has c
Generalize isLoopGuardedByCond's checking to consider two 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
show more ...
|
#
90d612e5 |
| 20-Jun-2009 |
Dan Gohman <gohman@apple.com> |
Use ScalarEvolution's new GetMinSignBits and GetMinLeadingZeros in the loop backedge-taken count computation of the maximum possible trip count.
llvm-svn: 73805
|
#
c702fc0e |
| 19-Jun-2009 |
Dan Gohman <gohman@apple.com> |
Make GetMinTrailingZeros a member function of ScalarEvolution, so that it can access the TargetData member (when available) and use ValueTracking.h information to compute information for SCEVUnknown
Make GetMinTrailingZeros a member function of ScalarEvolution, 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
show more ...
|
#
b9063a84 |
| 19-Jun-2009 |
Dan Gohman <gohman@apple.com> |
Make ScalarEvolution::print print getSCEVAtScope values for expressions, when interesting.
llvm-svn: 73776
|
#
38830b19 |
| 18-Jun-2009 |
Owen Anderson <resistor@mac.com> |
Add a parent pointer to SCEV, in preparation for getting rid of the global uniquing tables. No functionality change.
llvm-svn: 73728
|
#
4d3c3cff |
| 18-Jun-2009 |
Dan Gohman <gohman@apple.com> |
Recognize n != 0 ? n : 1 as umax(n, 1). Previously only ULT/UGT/ULE/UGE comparisons were recognized for umax, but instcombine canonicalizes unsigned comparisons with zero to this simpler form.
llvm-
Recognize n != 0 ? n : 1 as umax(n, 1). Previously only ULT/UGT/ULE/UGE comparisons were recognized for umax, but instcombine canonicalizes unsigned comparisons with zero to this simpler form.
llvm-svn: 73717
show more ...
|
#
5a728c90 |
| 18-Jun-2009 |
Dan Gohman <gohman@apple.com> |
Update a comment to reflect the code.
llvm-svn: 73704
|
#
94c468f4 |
| 18-Jun-2009 |
Dan Gohman <gohman@apple.com> |
Fix trailing whitespace from ScalarEvolution::print.
llvm-svn: 73666
|
#
eddf7712 |
| 18-Jun-2009 |
Dan Gohman <gohman@apple.com> |
Teach ScalarEvolution how to recognize another xor(and(x, C), C) case. 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: 73
Teach ScalarEvolution how to recognize another xor(and(x, C), C) case. 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
show more ...
|