mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-30 05:24:22 +00:00
capitalize SCEV to match the current naming convention
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175302 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -549,12 +549,12 @@ namespace llvm {
|
|||||||
T.visitAll(Root);
|
T.visitAll(Root);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The ScevRewriter takes a scalar evolution expression and copies all its
|
/// The SCEVRewriter takes a scalar evolution expression and copies all its
|
||||||
/// components. The result after a rewrite is an identical SCEV.
|
/// components. The result after a rewrite is an identical SCEV.
|
||||||
struct ScevRewriter
|
struct SCEVRewriter
|
||||||
: public SCEVVisitor<ScevRewriter, const SCEV*> {
|
: public SCEVVisitor<SCEVRewriter, const SCEV*> {
|
||||||
public:
|
public:
|
||||||
ScevRewriter(ScalarEvolution &S) : SE(S) {}
|
SCEVRewriter(ScalarEvolution &S) : SE(S) {}
|
||||||
|
|
||||||
virtual const SCEV *visitConstant(const SCEVConstant *Constant) {
|
virtual const SCEV *visitConstant(const SCEVConstant *Constant) {
|
||||||
return Constant;
|
return Constant;
|
||||||
@ -629,17 +629,17 @@ namespace llvm {
|
|||||||
|
|
||||||
typedef DenseMap<const Value*, Value*> ValueToValueMap;
|
typedef DenseMap<const Value*, Value*> ValueToValueMap;
|
||||||
|
|
||||||
/// The ScevParameterRewriter takes a scalar evolution expression and updates
|
/// The SCEVParameterRewriter takes a scalar evolution expression and updates
|
||||||
/// the SCEVUnknown components following the Map (Value -> Value).
|
/// the SCEVUnknown components following the Map (Value -> Value).
|
||||||
struct ScevParameterRewriter: public ScevRewriter {
|
struct SCEVParameterRewriter: public SCEVRewriter {
|
||||||
public:
|
public:
|
||||||
static const SCEV *rewrite(const SCEV *Scev, ScalarEvolution &SE,
|
static const SCEV *rewrite(const SCEV *Scev, ScalarEvolution &SE,
|
||||||
ValueToValueMap &Map) {
|
ValueToValueMap &Map) {
|
||||||
ScevParameterRewriter Rewriter(SE, Map);
|
SCEVParameterRewriter Rewriter(SE, Map);
|
||||||
return Rewriter.visit(Scev);
|
return Rewriter.visit(Scev);
|
||||||
}
|
}
|
||||||
ScevParameterRewriter(ScalarEvolution &S, ValueToValueMap &M)
|
SCEVParameterRewriter(ScalarEvolution &S, ValueToValueMap &M)
|
||||||
: ScevRewriter(S), Map(M) {}
|
: SCEVRewriter(S), Map(M) {}
|
||||||
|
|
||||||
virtual const SCEV *visitUnknown(const SCEVUnknown *Expr) {
|
virtual const SCEV *visitUnknown(const SCEVUnknown *Expr) {
|
||||||
Value *V = Expr->getValue();
|
Value *V = Expr->getValue();
|
||||||
@ -654,17 +654,17 @@ namespace llvm {
|
|||||||
|
|
||||||
typedef DenseMap<const Loop*, const SCEV*> LoopToScevMapT;
|
typedef DenseMap<const Loop*, const SCEV*> LoopToScevMapT;
|
||||||
|
|
||||||
/// The ScevApplyRewriter takes a scalar evolution expression and applies
|
/// The SCEVApplyRewriter takes a scalar evolution expression and applies
|
||||||
/// the Map (Loop -> SCEV) to all AddRecExprs.
|
/// the Map (Loop -> SCEV) to all AddRecExprs.
|
||||||
struct ScevApplyRewriter: public ScevRewriter {
|
struct SCEVApplyRewriter: public SCEVRewriter {
|
||||||
public:
|
public:
|
||||||
static const SCEV *rewrite(const SCEV *Scev, LoopToScevMapT &Map,
|
static const SCEV *rewrite(const SCEV *Scev, LoopToScevMapT &Map,
|
||||||
ScalarEvolution &SE) {
|
ScalarEvolution &SE) {
|
||||||
ScevApplyRewriter Rewriter(SE, Map);
|
SCEVApplyRewriter Rewriter(SE, Map);
|
||||||
return Rewriter.visit(Scev);
|
return Rewriter.visit(Scev);
|
||||||
}
|
}
|
||||||
ScevApplyRewriter(ScalarEvolution &S, LoopToScevMapT &M)
|
SCEVApplyRewriter(ScalarEvolution &S, LoopToScevMapT &M)
|
||||||
: ScevRewriter(S), Map(M) {}
|
: SCEVRewriter(S), Map(M) {}
|
||||||
|
|
||||||
virtual const SCEV *visitAddRecExpr(const SCEVAddRecExpr *Expr) {
|
virtual const SCEV *visitAddRecExpr(const SCEVAddRecExpr *Expr) {
|
||||||
SmallVector<const SCEV *, 2> Operands;
|
SmallVector<const SCEV *, 2> Operands;
|
||||||
@ -688,7 +688,7 @@ namespace llvm {
|
|||||||
/// Applies the Map (Loop -> SCEV) to the given Scev.
|
/// Applies the Map (Loop -> SCEV) to the given Scev.
|
||||||
static inline const SCEV *apply(const SCEV *Scev, LoopToScevMapT &Map,
|
static inline const SCEV *apply(const SCEV *Scev, LoopToScevMapT &Map,
|
||||||
ScalarEvolution &SE) {
|
ScalarEvolution &SE) {
|
||||||
return ScevApplyRewriter::rewrite(Scev, Map, SE);
|
return SCEVApplyRewriter::rewrite(Scev, Map, SE);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user