diff options
author | Silviu Baranga <silviu.baranga@arm.com> | 2016-03-23 15:29:30 +0000 |
---|---|---|
committer | Silviu Baranga <silviu.baranga@arm.com> | 2016-03-23 15:29:30 +0000 |
commit | d68ed85401a5b1d40fb6065bcbd363e1bd78402d (patch) | |
tree | db5d03257f605f9f2d1ea0db5b0dbf5bc433acfc /llvm/lib/Analysis/LoopAccessAnalysis.cpp | |
parent | ffcad441fd86bc09407ad71f83f8b8d7ba37e1d8 (diff) | |
download | bcm5719-llvm-d68ed85401a5b1d40fb6065bcbd363e1bd78402d.tar.gz bcm5719-llvm-d68ed85401a5b1d40fb6065bcbd363e1bd78402d.zip |
[SCEV] Change the SCEV Predicates interfaces for conversion to AddRecExpr to return SCEVAddRecExpr* instead of SCEV*
Summary:
This changes the conversion functions from SCEV * to SCEVAddRecExpr from
ScalarEvolution and PredicatedScalarEvolution to return a SCEVAddRecExpr*
instead of a SCEV* (which removes the need of most clients to do a
dyn_cast right after calling these functions).
We also don't add new predicates if the transformation was not successful.
This is not entirely a NFC (as it can theoretically remove some predicates
from LAA when we have an unknown dependece), but I couldn't find an obvious
regression test for it.
Reviewers: sanjoy
Subscribers: sanjoy, mzolotukhin, llvm-commits
Differential Revision: http://reviews.llvm.org/D18368
llvm-svn: 264161
Diffstat (limited to 'llvm/lib/Analysis/LoopAccessAnalysis.cpp')
-rw-r--r-- | llvm/lib/Analysis/LoopAccessAnalysis.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/LoopAccessAnalysis.cpp b/llvm/lib/Analysis/LoopAccessAnalysis.cpp index 159d6ae64a0..04a4b1fa5a3 100644 --- a/llvm/lib/Analysis/LoopAccessAnalysis.cpp +++ b/llvm/lib/Analysis/LoopAccessAnalysis.cpp @@ -837,7 +837,7 @@ int llvm::isStridedPtr(PredicatedScalarEvolution &PSE, Value *Ptr, const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(PtrScev); if (Assume && !AR) - AR = dyn_cast<SCEVAddRecExpr>(PSE.getAsAddRec(Ptr)); + AR = PSE.getAsAddRec(Ptr); if (!AR) { DEBUG(dbgs() << "LAA: Bad stride - Not an AddRecExpr pointer " << *Ptr |