X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FInstructions.h;h=146d1f50a645d0aede3f2ff7e934766f01a0e15a;hb=a727d5502c8e23c090da658bf14c5ebc1169a070;hp=0a61d120c25590fa67a0cf3e822c993230c4f9fa;hpb=2330e4d4c4f8008d17f5a38ac0d7b04e139d4131;p=oota-llvm.git diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h index 0a61d120c25..146d1f50a64 100644 --- a/include/llvm/Instructions.h +++ b/include/llvm/Instructions.h @@ -246,15 +246,16 @@ public: /// setVolatile - Specify whether this is a volatile load or not. /// - void setVolatile(bool V) { SubclassData = (SubclassData & ~1) | (V) ? 1 : 0; } + void setVolatile(bool V) { + SubclassData = (SubclassData & ~1) | ((V) ? 1 : 0); + } virtual LoadInst *clone() const; /// getAlignment - Return the alignment of the access that is being performed /// unsigned getAlignment() const { - signed Log2AlignVal = ((SubclassData>>1)-1); - return ((Log2AlignVal < 0) ? 0 : 1<>1)) >> 1; } void setAlignment(unsigned Align); @@ -311,7 +312,9 @@ public: /// setVolatile - Specify whether this is a volatile load or not. /// - void setVolatile(bool V) { SubclassData = (SubclassData & ~1) | (V) ? 1 : 0; } + void setVolatile(bool V) { + SubclassData = (SubclassData & ~1) | ((V) ? 1 : 0); + } /// Transparently provide more efficient getOperand methods. Value *getOperand(unsigned i) const { @@ -327,8 +330,7 @@ public: /// getAlignment - Return the alignment of the access that is being performed /// unsigned getAlignment() const { - signed Log2AlignVal = ((SubclassData>>1)-1); - return ((Log2AlignVal < 0) ? 0 : 1<>1)) >> 1; } void setAlignment(unsigned Align); @@ -439,6 +441,12 @@ public: /// zeros. If so, the result pointer and the first operand have the same /// value, just potentially different types. bool hasAllZeroIndices() const; + + /// hasAllConstantIndices - Return true if all of the indices of this GEP are + /// constant integers. If so, the result pointer and the first operand have + /// a constant offset between them. + bool hasAllConstantIndices() const; + // Methods for support type inquiry through isa, cast, and dyn_cast: static inline bool classof(const GetElementPtrInst *) { return true; } @@ -777,7 +785,7 @@ public: /// Sets the parameter attributes for this CallInst. To construct a /// ParamAttrsList, see ParameterAttributes.h /// @brief Set the parameter attributes. - void setParamAttrs(ParamAttrsList *attrs) { ParamAttrs = attrs; } + void setParamAttrs(ParamAttrsList *attrs); /// getCalledFunction - Return the function being called by this instruction /// if it is a direct call. If it is a call through a function pointer, @@ -1508,7 +1516,7 @@ public: /// Sets the parameter attributes for this InvokeInst. To construct a /// ParamAttrsList, see ParameterAttributes.h /// @brief Set the parameter attributes. - void setParamAttrs(ParamAttrsList *attrs) { ParamAttrs = attrs; } + void setParamAttrs(ParamAttrsList *attrs); /// getCalledFunction - Return the function called, or null if this is an /// indirect function invocation.