Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | [IRCE] isKnownNonNegative helper function | Sam Parker | 2018-04-12 | 1 | -1/+1 |
| | | | | | | | | | | Created a helper function to query for non negative SCEVs. Uses the SGE predicate to catch constants that could be interpreted as negative. Differential Revision: https://reviews.llvm.org/D45481 llvm-svn: 329907 | ||||
* | [IRCE] Enable decreasing loops of non-const bound | Sam Parker | 2018-03-27 | 1 | -0/+180 |
| | | | | | | | | | | | | | | As a follow-up to r328480, this updates the logic for the decreasing safety checks in a similar manner: - CanBeMax is replaced by CannotBeMaxInLoop which queries isLoopEntryGuardedByCond on the maximum value. - SumCanReachMin is replaced by isSafeDecreasingBound which includes some logic from parseLoopStructure and, again, has been updated to use isLoopEntryGuardedByCond on the given bounds. Differential Revision: https://reviews.llvm.org/D44776 llvm-svn: 328613 | ||||
* | [IRCE] Enable increasing loops of variable bounds | Sam Parker | 2018-03-26 | 1 | -0/+174 |
CanBeMin is currently used which will report true for any unknown values, but often a check is performed outside the loop which covers this situation: for (int i = 0; i < N; ++i) ... if (N > 0) for (int i = 0; i < N; ++i) ... So I've add 'LoopGuardedAgainstMin' which reports whether N is greater than the minimum value which then allows loop with a variable loop count to be optimised. I've also moved the increasing bound checking into its own function and replaced SumCanReachMax is another isLoopEntryGuardedByCond function. llvm-svn: 328480 |