summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-08-20 17:11:38 +0000
committerDan Gohman <gohman@apple.com>2009-08-20 17:11:38 +0000
commit5078f84c82814e4d33846f9ef54281619d362f8a (patch)
tree921b04304283dd557b56cc489695298c0569ae12 /include
parentb255b88f06b81523c64369fe686fedab0225de54 (diff)
downloadllvm-5078f84c82814e4d33846f9ef54281619d362f8a.tar.gz
llvm-5078f84c82814e4d33846f9ef54281619d362f8a.tar.bz2
llvm-5078f84c82814e4d33846f9ef54281619d362f8a.tar.xz
Rename hasNoUnsignedOverflow and hasNoSignedOverflow to hasNoUnsignedWrap
and hasNoSignedWrap, for consistency with the nuw and nsw properties. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79539 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Analysis/ScalarEvolutionExpressions.h8
-rw-r--r--include/llvm/Bitcode/LLVMBitCodes.h4
-rw-r--r--include/llvm/InstrTypes.h6
-rw-r--r--include/llvm/Operator.h16
4 files changed, 17 insertions, 17 deletions
diff --git a/include/llvm/Analysis/ScalarEvolutionExpressions.h b/include/llvm/Analysis/ScalarEvolutionExpressions.h
index 35372be126..447be0c5e1 100644
--- a/include/llvm/Analysis/ScalarEvolutionExpressions.h
+++ b/include/llvm/Analysis/ScalarEvolutionExpressions.h
@@ -426,12 +426,12 @@ namespace llvm {
return cast<SCEVAddRecExpr>(SE.getAddExpr(this, getStepRecurrence(SE)));
}
- bool hasNoUnsignedOverflow() const { return SubclassData & (1 << 0); }
- void setHasNoUnsignedOverflow(bool B) {
+ bool hasNoUnsignedWrap() const { return SubclassData & (1 << 0); }
+ void setHasNoUnsignedWrap(bool B) {
SubclassData = (SubclassData & ~(1 << 0)) | (B << 0);
}
- bool hasNoSignedOverflow() const { return SubclassData & (1 << 1); }
- void setHasNoSignedOverflow(bool B) {
+ bool hasNoSignedWrap() const { return SubclassData & (1 << 1); }
+ void setHasNoSignedWrap(bool B) {
SubclassData = (SubclassData & ~(1 << 1)) | (B << 1);
}
diff --git a/include/llvm/Bitcode/LLVMBitCodes.h b/include/llvm/Bitcode/LLVMBitCodes.h
index a1c8cb0401..2f967d6c9a 100644
--- a/include/llvm/Bitcode/LLVMBitCodes.h
+++ b/include/llvm/Bitcode/LLVMBitCodes.h
@@ -180,8 +180,8 @@ namespace bitc {
/// OverflowingBinaryOperatorOptionalFlags - Flags for serializing
/// OverflowingBinaryOperator's SubclassOptionalData contents.
enum OverflowingBinaryOperatorOptionalFlags {
- OBO_NO_UNSIGNED_OVERFLOW = 0,
- OBO_NO_SIGNED_OVERFLOW = 1
+ OBO_NO_UNSIGNED_WRAP = 0,
+ OBO_NO_SIGNED_WRAP = 1
};
/// SDivOperatorOptionalFlags - Flags for serializing SDivOperator's
diff --git a/include/llvm/InstrTypes.h b/include/llvm/InstrTypes.h
index 560c32b73a..35fec63ddf 100644
--- a/include/llvm/InstrTypes.h
+++ b/include/llvm/InstrTypes.h
@@ -201,19 +201,19 @@ public:
static BinaryOperator *CreateNSWAdd(Value *V1, Value *V2,
const Twine &Name = "") {
BinaryOperator *BO = CreateAdd(V1, V2, Name);
- cast<AddOperator>(BO)->setHasNoSignedOverflow(true);
+ cast<AddOperator>(BO)->setHasNoSignedWrap(true);
return BO;
}
static BinaryOperator *CreateNSWAdd(Value *V1, Value *V2,
const Twine &Name, BasicBlock *BB) {
BinaryOperator *BO = CreateAdd(V1, V2, Name, BB);
- cast<AddOperator>(BO)->setHasNoSignedOverflow(true);
+ cast<AddOperator>(BO)->setHasNoSignedWrap(true);
return BO;
}
static BinaryOperator *CreateNSWAdd(Value *V1, Value *V2,
const Twine &Name, Instruction *I) {
BinaryOperator *BO = CreateAdd(V1, V2, Name, I);
- cast<AddOperator>(BO)->setHasNoSignedOverflow(true);
+ cast<AddOperator>(BO)->setHasNoSignedWrap(true);
return BO;
}
diff --git a/include/llvm/Operator.h b/include/llvm/Operator.h
index 285c585db6..48ac09d54f 100644
--- a/include/llvm/Operator.h
+++ b/include/llvm/Operator.h
@@ -69,21 +69,21 @@ public:
class OverflowingBinaryOperator : public Operator {
~OverflowingBinaryOperator(); // do not implement
public:
- /// hasNoUnsignedOverflow - Test whether this operation is known to never
- /// undergo unsigned overflow.
- bool hasNoUnsignedOverflow() const {
+ /// hasNoUnsignedWrap - Test whether this operation is known to never
+ /// undergo unsigned overflow, aka the nuw property.
+ bool hasNoUnsignedWrap() const {
return SubclassOptionalData & (1 << 0);
}
- void setHasNoUnsignedOverflow(bool B) {
+ void setHasNoUnsignedWrap(bool B) {
SubclassOptionalData = (SubclassOptionalData & ~(1 << 0)) | (B << 0);
}
- /// hasNoSignedOverflow - Test whether this operation is known to never
- /// undergo signed overflow.
- bool hasNoSignedOverflow() const {
+ /// hasNoSignedWrap - Test whether this operation is known to never
+ /// undergo signed overflow, aka the nsw property.
+ bool hasNoSignedWrap() const {
return SubclassOptionalData & (1 << 1);
}
- void setHasNoSignedOverflow(bool B) {
+ void setHasNoSignedWrap(bool B) {
SubclassOptionalData = (SubclassOptionalData & ~(1 << 1)) | (B << 1);
}