mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
[SCEV] make SCEV smarter about proving no-wrap.
Summary: Teach SCEV to prove no overflow for an add recurrence by proving something about the range of another add recurrence a loop-invariant distance away from it. Reviewers: atrick, hfinkel Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D7980 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231305 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -561,6 +561,15 @@ namespace llvm {
|
||||
/// pointer.
|
||||
bool checkValidity(const SCEV *S) const;
|
||||
|
||||
// Return true if `ExtendOpTy`({`Start`,+,`Step`}) can be proved to be equal
|
||||
// to {`ExtendOpTy`(`Start`),+,`ExtendOpTy`(`Step`)}. This is equivalent to
|
||||
// proving no signed (resp. unsigned) wrap in {`Start`,+,`Step`} if
|
||||
// `ExtendOpTy` is `SCEVSignExtendExpr` (resp. `SCEVZeroExtendExpr`).
|
||||
//
|
||||
template<typename ExtendOpTy>
|
||||
bool proveNoWrapByVaryingStart(const SCEV *Start, const SCEV *Step,
|
||||
const Loop *L);
|
||||
|
||||
public:
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
ScalarEvolution();
|
||||
|
Reference in New Issue
Block a user