diff options
author | Dan Gohman <gohman@apple.com> | 2009-07-27 21:53:46 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-07-27 21:53:46 +0000 |
commit | dd8004dc73d091ccb3927dbbc3b41639a3738ae3 (patch) | |
tree | 635ee4ff5a89aefb2eb5ba8394207f65c8771bcf /include | |
parent | 9a7e2ccf574368b60455f8c8975030475a1f3ce0 (diff) | |
download | external_llvm-dd8004dc73d091ccb3927dbbc3b41639a3738ae3.zip external_llvm-dd8004dc73d091ccb3927dbbc3b41639a3738ae3.tar.gz external_llvm-dd8004dc73d091ccb3927dbbc3b41639a3738ae3.tar.bz2 |
Add a new keyword 'inbounds' for use with getelementptr. See the
LangRef.html changes for details.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77259 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Bitcode/LLVMBitCodes.h | 6 | ||||
-rw-r--r-- | include/llvm/Operator.h | 9 |
2 files changed, 13 insertions, 2 deletions
diff --git a/include/llvm/Bitcode/LLVMBitCodes.h b/include/llvm/Bitcode/LLVMBitCodes.h index 3d8c246..38f152d 100644 --- a/include/llvm/Bitcode/LLVMBitCodes.h +++ b/include/llvm/Bitcode/LLVMBitCodes.h @@ -132,7 +132,8 @@ namespace bitc { CST_CODE_CE_SHUFFLEVEC = 16, // CE_SHUFFLEVEC: [opval, opval, opval] CST_CODE_CE_CMP = 17, // CE_CMP: [opty, opval, opval, pred] CST_CODE_INLINEASM = 18, // INLINEASM: [sideeffect,asmstr,conststr] - CST_CODE_CE_SHUFVEC_EX = 19 // SHUFVEC_EX: [opty, opval, opval, opval] + CST_CODE_CE_SHUFVEC_EX = 19, // SHUFVEC_EX: [opty, opval, opval, opval] + CST_CODE_CE_INBOUNDS_GEP = 20 // INBOUNDS_GEP: [n x operands] }; /// CastOpcodes - These are values used in the bitcode files to encode which @@ -229,7 +230,8 @@ namespace bitc { // support legacy vicmp/vfcmp instructions. FUNC_CODE_INST_CMP2 = 28, // CMP2: [opty, opval, opval, pred] // new select on i1 or [N x i1] - FUNC_CODE_INST_VSELECT = 29 // VSELECT: [ty,opval,opval,predty,pred] + FUNC_CODE_INST_VSELECT = 29, // VSELECT: [ty,opval,opval,predty,pred] + FUNC_CODE_INST_INBOUNDS_GEP = 30 // INBOUNDS_GEP: [n x operands] }; } // End bitc namespace } // End llvm namespace diff --git a/include/llvm/Operator.h b/include/llvm/Operator.h index 932c2ac..c62164b 100644 --- a/include/llvm/Operator.h +++ b/include/llvm/Operator.h @@ -181,6 +181,15 @@ public: class GEPOperator : public Operator { public: + /// isInBounds - Test whether this is an inbounds GEP, as defined + /// by LangRef.html. + bool isInBounds() const { + return SubclassOptionalData & (1 << 0); + } + void setIsInBounds(bool B) { + SubclassOptionalData = (SubclassOptionalData & ~(1 << 0)) | (B << 0); + } + inline op_iterator idx_begin() { return op_begin()+1; } inline const_op_iterator idx_begin() const { return op_begin()+1; } inline op_iterator idx_end() { return op_end(); } |