mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-29 10:25:12 +00:00
Revert r106304 (105548 and friends), which are the SCEVComplexityCompare
optimizations. There is still some nondeterminism remaining. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106306 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -37,8 +37,8 @@ namespace llvm {
|
||||
friend class ScalarEvolution;
|
||||
|
||||
ConstantInt *V;
|
||||
SCEVConstant(const FoldingSetNodeIDRef ID, unsigned Num, ConstantInt *v)
|
||||
: SCEV(ID, Num, scConstant), V(v) {}
|
||||
SCEVConstant(const FoldingSetNodeIDRef ID, ConstantInt *v) :
|
||||
SCEV(ID, scConstant), V(v) {}
|
||||
public:
|
||||
ConstantInt *getValue() const { return V; }
|
||||
|
||||
@@ -81,7 +81,7 @@ namespace llvm {
|
||||
const SCEV *Op;
|
||||
const Type *Ty;
|
||||
|
||||
SCEVCastExpr(const FoldingSetNodeIDRef ID, unsigned Num,
|
||||
SCEVCastExpr(const FoldingSetNodeIDRef ID,
|
||||
unsigned SCEVTy, const SCEV *op, const Type *ty);
|
||||
|
||||
public:
|
||||
@@ -120,7 +120,7 @@ namespace llvm {
|
||||
class SCEVTruncateExpr : public SCEVCastExpr {
|
||||
friend class ScalarEvolution;
|
||||
|
||||
SCEVTruncateExpr(const FoldingSetNodeIDRef ID, unsigned Num,
|
||||
SCEVTruncateExpr(const FoldingSetNodeIDRef ID,
|
||||
const SCEV *op, const Type *ty);
|
||||
|
||||
public:
|
||||
@@ -140,7 +140,7 @@ namespace llvm {
|
||||
class SCEVZeroExtendExpr : public SCEVCastExpr {
|
||||
friend class ScalarEvolution;
|
||||
|
||||
SCEVZeroExtendExpr(const FoldingSetNodeIDRef ID, unsigned Num,
|
||||
SCEVZeroExtendExpr(const FoldingSetNodeIDRef ID,
|
||||
const SCEV *op, const Type *ty);
|
||||
|
||||
public:
|
||||
@@ -160,7 +160,7 @@ namespace llvm {
|
||||
class SCEVSignExtendExpr : public SCEVCastExpr {
|
||||
friend class ScalarEvolution;
|
||||
|
||||
SCEVSignExtendExpr(const FoldingSetNodeIDRef ID, unsigned Num,
|
||||
SCEVSignExtendExpr(const FoldingSetNodeIDRef ID,
|
||||
const SCEV *op, const Type *ty);
|
||||
|
||||
public:
|
||||
@@ -187,9 +187,9 @@ namespace llvm {
|
||||
const SCEV *const *Operands;
|
||||
size_t NumOperands;
|
||||
|
||||
SCEVNAryExpr(const FoldingSetNodeIDRef ID, unsigned Num,
|
||||
SCEVNAryExpr(const FoldingSetNodeIDRef ID,
|
||||
enum SCEVTypes T, const SCEV *const *O, size_t N)
|
||||
: SCEV(ID, Num, T), Operands(O), NumOperands(N) {}
|
||||
: SCEV(ID, T), Operands(O), NumOperands(N) {}
|
||||
|
||||
public:
|
||||
size_t getNumOperands() const { return NumOperands; }
|
||||
@@ -262,9 +262,9 @@ namespace llvm {
|
||||
///
|
||||
class SCEVCommutativeExpr : public SCEVNAryExpr {
|
||||
protected:
|
||||
SCEVCommutativeExpr(const FoldingSetNodeIDRef ID, unsigned Num,
|
||||
SCEVCommutativeExpr(const FoldingSetNodeIDRef ID,
|
||||
enum SCEVTypes T, const SCEV *const *O, size_t N)
|
||||
: SCEVNAryExpr(ID, Num, T, O, N) {}
|
||||
: SCEVNAryExpr(ID, T, O, N) {}
|
||||
|
||||
public:
|
||||
virtual const char *getOperationStr() const = 0;
|
||||
@@ -288,9 +288,9 @@ namespace llvm {
|
||||
class SCEVAddExpr : public SCEVCommutativeExpr {
|
||||
friend class ScalarEvolution;
|
||||
|
||||
SCEVAddExpr(const FoldingSetNodeIDRef ID, unsigned Num,
|
||||
SCEVAddExpr(const FoldingSetNodeIDRef ID,
|
||||
const SCEV *const *O, size_t N)
|
||||
: SCEVCommutativeExpr(ID, Num, scAddExpr, O, N) {
|
||||
: SCEVCommutativeExpr(ID, scAddExpr, O, N) {
|
||||
}
|
||||
|
||||
public:
|
||||
@@ -316,9 +316,9 @@ namespace llvm {
|
||||
class SCEVMulExpr : public SCEVCommutativeExpr {
|
||||
friend class ScalarEvolution;
|
||||
|
||||
SCEVMulExpr(const FoldingSetNodeIDRef ID, unsigned Num,
|
||||
SCEVMulExpr(const FoldingSetNodeIDRef ID,
|
||||
const SCEV *const *O, size_t N)
|
||||
: SCEVCommutativeExpr(ID, Num, scMulExpr, O, N) {
|
||||
: SCEVCommutativeExpr(ID, scMulExpr, O, N) {
|
||||
}
|
||||
|
||||
public:
|
||||
@@ -340,9 +340,8 @@ namespace llvm {
|
||||
|
||||
const SCEV *LHS;
|
||||
const SCEV *RHS;
|
||||
SCEVUDivExpr(const FoldingSetNodeIDRef ID, unsigned Num,
|
||||
const SCEV *lhs, const SCEV *rhs)
|
||||
: SCEV(ID, Num, scUDivExpr), LHS(lhs), RHS(rhs) {}
|
||||
SCEVUDivExpr(const FoldingSetNodeIDRef ID, const SCEV *lhs, const SCEV *rhs)
|
||||
: SCEV(ID, scUDivExpr), LHS(lhs), RHS(rhs) {}
|
||||
|
||||
public:
|
||||
const SCEV *getLHS() const { return LHS; }
|
||||
@@ -391,9 +390,9 @@ namespace llvm {
|
||||
|
||||
const Loop *L;
|
||||
|
||||
SCEVAddRecExpr(const FoldingSetNodeIDRef ID, unsigned Num,
|
||||
SCEVAddRecExpr(const FoldingSetNodeIDRef ID,
|
||||
const SCEV *const *O, size_t N, const Loop *l)
|
||||
: SCEVNAryExpr(ID, Num, scAddRecExpr, O, N), L(l) {
|
||||
: SCEVNAryExpr(ID, scAddRecExpr, O, N), L(l) {
|
||||
for (size_t i = 0, e = NumOperands; i != e; ++i)
|
||||
assert(Operands[i]->isLoopInvariant(l) &&
|
||||
"Operands of AddRec must be loop-invariant!");
|
||||
@@ -473,9 +472,9 @@ namespace llvm {
|
||||
class SCEVSMaxExpr : public SCEVCommutativeExpr {
|
||||
friend class ScalarEvolution;
|
||||
|
||||
SCEVSMaxExpr(const FoldingSetNodeIDRef ID, unsigned Num,
|
||||
SCEVSMaxExpr(const FoldingSetNodeIDRef ID,
|
||||
const SCEV *const *O, size_t N)
|
||||
: SCEVCommutativeExpr(ID, Num, scSMaxExpr, O, N) {
|
||||
: SCEVCommutativeExpr(ID, scSMaxExpr, O, N) {
|
||||
// Max never overflows.
|
||||
setHasNoUnsignedWrap(true);
|
||||
setHasNoSignedWrap(true);
|
||||
@@ -498,9 +497,9 @@ namespace llvm {
|
||||
class SCEVUMaxExpr : public SCEVCommutativeExpr {
|
||||
friend class ScalarEvolution;
|
||||
|
||||
SCEVUMaxExpr(const FoldingSetNodeIDRef ID, unsigned Num,
|
||||
SCEVUMaxExpr(const FoldingSetNodeIDRef ID,
|
||||
const SCEV *const *O, size_t N)
|
||||
: SCEVCommutativeExpr(ID, Num, scUMaxExpr, O, N) {
|
||||
: SCEVCommutativeExpr(ID, scUMaxExpr, O, N) {
|
||||
// Max never overflows.
|
||||
setHasNoUnsignedWrap(true);
|
||||
setHasNoSignedWrap(true);
|
||||
@@ -525,8 +524,8 @@ namespace llvm {
|
||||
friend class ScalarEvolution;
|
||||
|
||||
Value *V;
|
||||
SCEVUnknown(const FoldingSetNodeIDRef ID, unsigned Num, Value *v)
|
||||
: SCEV(ID, Num, scUnknown), V(v) {}
|
||||
SCEVUnknown(const FoldingSetNodeIDRef ID, Value *v) :
|
||||
SCEV(ID, scUnknown), V(v) {}
|
||||
|
||||
public:
|
||||
Value *getValue() const { return V; }
|
||||
|
Reference in New Issue
Block a user