OSDN Git Service

Give SCEVAddRecExpr no-signed-overflow and no-unsigned-overflow flags.
authorDan Gohman <gohman@apple.com>
Fri, 24 Jul 2009 01:01:06 +0000 (01:01 +0000)
committerDan Gohman <gohman@apple.com>
Fri, 24 Jul 2009 01:01:06 +0000 (01:01 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76928 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Analysis/ScalarEvolutionExpressions.h

index a7cea9d..830143b 100644 (file)
@@ -459,6 +459,15 @@ namespace llvm {
       return SE.getAddExpr(this, getStepRecurrence(SE));
     }
 
+    bool hasNoUnsignedOverflow() const { return SubclassData & (1 << 0); }
+    void setHasNoUnsignedOverflow(bool B) {
+      SubclassData = (SubclassData & ~(1 << 0)) | (B << 0);
+    }
+    bool hasNoSignedOverflow() const { return SubclassData & (1 << 1); }
+    void setHasNoSignedOverflow(bool B) {
+      SubclassData = (SubclassData & ~(1 << 1)) | (B << 1);
+    }
+
     virtual void print(raw_ostream &OS) const;
 
     /// Methods for support type inquiry through isa, cast, and dyn_cast: