diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Analysis/ScalarEvolutionExpressions.h | 8 | ||||
-rw-r--r-- | include/llvm/Bitcode/LLVMBitCodes.h | 4 | ||||
-rw-r--r-- | include/llvm/InstrTypes.h | 6 | ||||
-rw-r--r-- | include/llvm/Operator.h | 16 |
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); } |