summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/LoopAccessAnalysis.cpp
diff options
context:
space:
mode:
authorSilviu Baranga <silviu.baranga@arm.com>2016-03-23 15:29:30 +0000
committerSilviu Baranga <silviu.baranga@arm.com>2016-03-23 15:29:30 +0000
commitd68ed85401a5b1d40fb6065bcbd363e1bd78402d (patch)
treedb5d03257f605f9f2d1ea0db5b0dbf5bc433acfc /llvm/lib/Analysis/LoopAccessAnalysis.cpp
parentffcad441fd86bc09407ad71f83f8b8d7ba37e1d8 (diff)
downloadbcm5719-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.cpp2
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
OpenPOWER on IntegriCloud