[PATCH] D14065: [SCEV] Fix issues found during the review of r251283. NFC.
silviu.baranga@arm.com via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 26 06:52:25 PDT 2015
This revision was automatically updated to reflect the committed changes.
Closed by commit rL251292: [SCEV] Fix issues found during the review of r251283. NFC. (authored by sbaranga).
Changed prior to commit:
http://reviews.llvm.org/D14065?vs=38413&id=38415#toc
Repository:
rL LLVM
http://reviews.llvm.org/D14065
Files:
llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpressions.h
Index: llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpressions.h
===================================================================
--- llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpressions.h
+++ llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpressions.h
@@ -664,18 +664,19 @@
typedef DenseMap<const Loop*, const SCEV*> LoopToScevMapT;
- /// The SCEVApplyRewriter takes a scalar evolution expression and applies
+ /// The SCEVLoopAddRecRewriter takes a scalar evolution expression and applies
/// the Map (Loop -> SCEV) to all AddRecExprs.
- class SCEVApplyRewriter : public SCEVRewriteVisitor<SCEVApplyRewriter> {
+ class SCEVLoopAddRecRewriter
+ : public SCEVRewriteVisitor<SCEVLoopAddRecRewriter> {
public:
static const SCEV *rewrite(const SCEV *Scev, LoopToScevMapT &Map,
ScalarEvolution &SE) {
- SCEVApplyRewriter Rewriter(SE, Map);
+ SCEVLoopAddRecRewriter Rewriter(SE, Map);
return Rewriter.visit(Scev);
}
- SCEVApplyRewriter(ScalarEvolution &SE, LoopToScevMapT &M)
- : SCEVRewriteVisitor(SE), Map(M) {}
+ SCEVLoopAddRecRewriter(ScalarEvolution &SE, LoopToScevMapT &M)
+ : SCEVRewriteVisitor(SE), Map(M) {}
const SCEV *visitAddRecExpr(const SCEVAddRecExpr *Expr) {
SmallVector<const SCEV *, 2> Operands;
@@ -688,7 +689,7 @@
if (0 == Map.count(L))
return Res;
- const SCEVAddRecExpr *Rec = (const SCEVAddRecExpr *) Res;
+ const SCEVAddRecExpr *Rec = cast<SCEVAddRecExpr>(Res);
return Rec->evaluateAtIteration(Map[L], SE);
}
@@ -699,7 +700,7 @@
/// Applies the Map (Loop -> SCEV) to the given Scev.
static inline const SCEV *apply(const SCEV *Scev, LoopToScevMapT &Map,
ScalarEvolution &SE) {
- return SCEVApplyRewriter::rewrite(Scev, Map, SE);
+ return SCEVLoopAddRecRewriter::rewrite(Scev, Map, SE);
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14065.38415.patch
Type: text/x-patch
Size: 1923 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151026/481f1d67/attachment.bin>
More information about the llvm-commits
mailing list