aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2009-01-13 09:18:58 +0000
committerNick Lewycky <nicholas@mxc.ca>2009-01-13 09:18:58 +0000
commit789558db70d9513a017c11c5be30945839fdff1c (patch)
treecfd434dff6168129e6b34ccc95cd8c247ff0fa87 /include
parent3ff704fa2b67d6c857142218c5aca3058b6239fc (diff)
downloadexternal_llvm-789558db70d9513a017c11c5be30945839fdff1c.zip
external_llvm-789558db70d9513a017c11c5be30945839fdff1c.tar.gz
external_llvm-789558db70d9513a017c11c5be30945839fdff1c.tar.bz2
Wind SCEV back in time, to Nov 18th. This 'fixes' PR3275, PR3294, PR3295,
PR3296 and PR3302. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62160 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Analysis/ScalarEvolution.h1
-rw-r--r--include/llvm/Analysis/ScalarEvolutionExpander.h5
-rw-r--r--include/llvm/Analysis/ScalarEvolutionExpressions.h53
3 files changed, 3 insertions, 56 deletions
diff --git a/include/llvm/Analysis/ScalarEvolution.h b/include/llvm/Analysis/ScalarEvolution.h
index f524daa..e16e990 100644
--- a/include/llvm/Analysis/ScalarEvolution.h
+++ b/include/llvm/Analysis/ScalarEvolution.h
@@ -225,7 +225,6 @@ namespace llvm {
return getMulExpr(Ops);
}
SCEVHandle getUDivExpr(const SCEVHandle &LHS, const SCEVHandle &RHS);
- SCEVHandle getSDivExpr(const SCEVHandle &LHS, const SCEVHandle &RHS);
SCEVHandle getAddRecExpr(const SCEVHandle &Start, const SCEVHandle &Step,
const Loop *L);
SCEVHandle getAddRecExpr(std::vector<SCEVHandle> &Operands,
diff --git a/include/llvm/Analysis/ScalarEvolutionExpander.h b/include/llvm/Analysis/ScalarEvolutionExpander.h
index a3ed17d..cd075ef 100644
--- a/include/llvm/Analysis/ScalarEvolutionExpander.h
+++ b/include/llvm/Analysis/ScalarEvolutionExpander.h
@@ -14,7 +14,7 @@
#ifndef LLVM_ANALYSIS_SCALAREVOLUTION_EXPANDER_H
#define LLVM_ANALYSIS_SCALAREVOLUTION_EXPANDER_H
-#include "llvm/Instruction.h"
+#include "llvm/Instructions.h"
#include "llvm/Type.h"
#include "llvm/Analysis/ScalarEvolution.h"
#include "llvm/Analysis/ScalarEvolutionExpressions.h"
@@ -104,8 +104,6 @@ namespace llvm {
Value *visitUDivExpr(SCEVUDivExpr *S);
- Value *visitSDivExpr(SCEVSDivExpr *S);
-
Value *visitAddRecExpr(SCEVAddRecExpr *S);
Value *visitSMaxExpr(SCEVSMaxExpr *S);
@@ -119,3 +117,4 @@ namespace llvm {
}
#endif
+
diff --git a/include/llvm/Analysis/ScalarEvolutionExpressions.h b/include/llvm/Analysis/ScalarEvolutionExpressions.h
index bedd075..652a99d 100644
--- a/include/llvm/Analysis/ScalarEvolutionExpressions.h
+++ b/include/llvm/Analysis/ScalarEvolutionExpressions.h
@@ -25,7 +25,7 @@ namespace llvm {
// These should be ordered in terms of increasing complexity to make the
// folders simpler.
scConstant, scTruncate, scZeroExtend, scSignExtend, scAddExpr, scMulExpr,
- scUDivExpr, scSDivExpr, scAddRecExpr, scUMaxExpr, scSMaxExpr, scUnknown,
+ scUDivExpr, scAddRecExpr, scUMaxExpr, scSMaxExpr, scUnknown,
scCouldNotCompute
};
@@ -358,55 +358,6 @@ namespace llvm {
//===--------------------------------------------------------------------===//
- /// SCEVSDivExpr - This class represents a binary signed division operation.
- ///
- class SCEVSDivExpr : public SCEV {
- friend class ScalarEvolution;
-
- SCEVHandle LHS, RHS;
- SCEVSDivExpr(const SCEVHandle &lhs, const SCEVHandle &rhs)
- : SCEV(scSDivExpr), LHS(lhs), RHS(rhs) {}
-
- virtual ~SCEVSDivExpr();
- public:
- const SCEVHandle &getLHS() const { return LHS; }
- const SCEVHandle &getRHS() const { return RHS; }
-
- virtual bool isLoopInvariant(const Loop *L) const {
- return LHS->isLoopInvariant(L) && RHS->isLoopInvariant(L);
- }
-
- virtual bool hasComputableLoopEvolution(const Loop *L) const {
- return LHS->hasComputableLoopEvolution(L) &&
- RHS->hasComputableLoopEvolution(L);
- }
-
- SCEVHandle replaceSymbolicValuesWithConcrete(const SCEVHandle &Sym,
- const SCEVHandle &Conc,
- ScalarEvolution &SE) const {
- SCEVHandle L = LHS->replaceSymbolicValuesWithConcrete(Sym, Conc, SE);
- SCEVHandle R = RHS->replaceSymbolicValuesWithConcrete(Sym, Conc, SE);
- if (L == LHS && R == RHS)
- return this;
- else
- return SE.getSDivExpr(L, R);
- }
-
-
- virtual const Type *getType() const;
-
- void print(std::ostream &OS) const;
- void print(std::ostream *OS) const { if (OS) print(*OS); }
-
- /// Methods for support type inquiry through isa, cast, and dyn_cast:
- static inline bool classof(const SCEVSDivExpr *S) { return true; }
- static inline bool classof(const SCEV *S) {
- return S->getSCEVType() == scSDivExpr;
- }
- };
-
-
- //===--------------------------------------------------------------------===//
/// SCEVAddRecExpr - This node represents a polynomial recurrence on the trip
/// count of the specified loop.
///
@@ -599,8 +550,6 @@ namespace llvm {
return ((SC*)this)->visitMulExpr((SCEVMulExpr*)S);
case scUDivExpr:
return ((SC*)this)->visitUDivExpr((SCEVUDivExpr*)S);
- case scSDivExpr:
- return ((SC*)this)->visitSDivExpr((SCEVSDivExpr*)S);
case scAddRecExpr:
return ((SC*)this)->visitAddRecExpr((SCEVAddRecExpr*)S);
case scSMaxExpr: