21 #ifndef LLVM_IR_CONSTANTS_H
22 #define LLVM_IR_CONSTANTS_H
40 struct ConstantExprKeyType;
48 void anchor()
override;
49 void *
operator new(size_t,
unsigned) =
delete;
55 void destroyConstantImpl();
60 void *
operator new(
size_t s) {
61 return User::operator
new(s, 0);
71 static Constant *
get(
Type *Ty, uint64_t V,
bool isSigned =
false);
80 bool isSigned =
false);
210 bool uge(uint64_t Num)
const {
235 void anchor()
override;
236 void *
operator new(size_t,
unsigned) =
delete;
241 void destroyConstantImpl();
248 void *
operator new(
size_t s) {
249 return User::operator
new(s, 0);
308 void *
operator new(size_t,
unsigned) =
delete;
312 void destroyConstantImpl();
317 :
Constant(ty, ConstantAggregateZeroVal, nullptr, 0) {}
320 void *
operator new(
size_t s) {
321 return User::operator
new(s, 0);
348 return V->
getValueID() == ConstantAggregateZeroVal;
361 void destroyConstantImpl();
404 friend class Constant;
405 void destroyConstantImpl();
419 return get(getTypeForElements(V, Packed), V);
423 return get(getTypeForElements(Ctx, V, Packed), V);
429 bool Packed =
false);
433 bool Packed =
false);
465 friend class Constant;
466 void destroyConstantImpl();
481 static Constant *getSplat(
unsigned NumElts, Constant *Elt);
495 Constant *getSplatValue()
const;
514 void *
operator new(size_t,
unsigned) =
delete;
517 friend class Constant;
518 void destroyConstantImpl();
524 Value::ConstantPointerNullVal, nullptr, 0) {}
528 void *
operator new(
size_t s) {
529 return User::operator
new(s, 0);
544 return V->
getValueID() == ConstantPointerNullVal;
561 const char *DataElements;
568 void *
operator new(size_t,
unsigned) =
delete;
572 void destroyConstantImpl();
577 :
Constant(ty, VT, nullptr, 0), DataElements(Data), Next(nullptr) {}
584 void *
operator new(
size_t s) {
585 return User::operator
new(s, 0);
646 assert(
isString() &&
"Not a string");
655 assert(
isCString() &&
"Isn't a C string");
668 return V->
getValueID() == ConstantDataArrayVal ||
672 const char *getElementPointer(
unsigned Elt)
const;
682 void *
operator new(size_t,
unsigned) =
delete;
684 void anchor()
override;
690 void *
operator new(
size_t s) {
691 return User::operator
new(s, 0);
720 bool AddNull =
true);
732 return V->
getValueID() == ConstantDataArrayVal;
743 void *
operator new(size_t,
unsigned) =
delete;
745 void anchor()
override;
751 void *
operator new(
size_t s) {
752 return User::operator
new(s, 0);
794 return V->
getValueID() == ConstantDataVectorVal;
803 void *
operator new(size_t,
unsigned) =
delete;
804 void *
operator new(
size_t s) {
return User::operator
new(s, 2); }
808 void destroyConstantImpl();
855 friend class Constant;
856 void destroyConstantImpl();
861 : Constant(ty, ConstantExprVal, Ops, NumOps) {
863 setValueSubclassData(Opcode);
874 static Constant *getAlignOf(
Type *Ty);
880 static Constant *getSizeOf(
Type *Ty);
885 static Constant *getOffsetOf(
StructType *STy,
unsigned FieldNo);
890 static Constant *getOffsetOf(
Type *Ty, Constant *FieldNo);
892 static Constant *getNeg(Constant *
C,
bool HasNUW =
false,
bool HasNSW =
false);
893 static Constant *getFNeg(Constant *
C);
894 static Constant *getNot(Constant *
C);
895 static Constant *getAdd(Constant *C1, Constant *C2,
896 bool HasNUW =
false,
bool HasNSW =
false);
897 static Constant *getFAdd(Constant *C1, Constant *C2);
898 static Constant *getSub(Constant *C1, Constant *C2,
899 bool HasNUW =
false,
bool HasNSW =
false);
900 static Constant *getFSub(Constant *C1, Constant *C2);
901 static Constant *getMul(Constant *C1, Constant *C2,
902 bool HasNUW =
false,
bool HasNSW =
false);
903 static Constant *getFMul(Constant *C1, Constant *C2);
904 static Constant *getUDiv(Constant *C1, Constant *C2,
bool isExact =
false);
905 static Constant *getSDiv(Constant *C1, Constant *C2,
bool isExact =
false);
906 static Constant *getFDiv(Constant *C1, Constant *C2);
907 static Constant *getURem(Constant *C1, Constant *C2);
908 static Constant *getSRem(Constant *C1, Constant *C2);
909 static Constant *getFRem(Constant *C1, Constant *C2);
910 static Constant *getAnd(Constant *C1, Constant *C2);
911 static Constant *getOr(Constant *C1, Constant *C2);
912 static Constant *getXor(Constant *C1, Constant *C2);
913 static Constant *getShl(Constant *C1, Constant *C2,
914 bool HasNUW =
false,
bool HasNSW =
false);
915 static Constant *getLShr(Constant *C1, Constant *C2,
bool isExact =
false);
916 static Constant *getAShr(Constant *C1, Constant *C2,
bool isExact =
false);
917 static Constant *getTrunc(Constant *
C,
Type *Ty,
bool OnlyIfReduced =
false);
918 static Constant *getSExt(Constant *
C,
Type *Ty,
bool OnlyIfReduced =
false);
919 static Constant *getZExt(Constant *
C,
Type *Ty,
bool OnlyIfReduced =
false);
920 static Constant *getFPTrunc(Constant *
C,
Type *Ty,
921 bool OnlyIfReduced =
false);
922 static Constant *getFPExtend(Constant *
C,
Type *Ty,
923 bool OnlyIfReduced =
false);
924 static Constant *getUIToFP(Constant *
C,
Type *Ty,
bool OnlyIfReduced =
false);
925 static Constant *getSIToFP(Constant *
C,
Type *Ty,
bool OnlyIfReduced =
false);
926 static Constant *getFPToUI(Constant *
C,
Type *Ty,
bool OnlyIfReduced =
false);
927 static Constant *getFPToSI(Constant *
C,
Type *Ty,
bool OnlyIfReduced =
false);
928 static Constant *getPtrToInt(Constant *
C,
Type *Ty,
929 bool OnlyIfReduced =
false);
930 static Constant *getIntToPtr(Constant *
C,
Type *Ty,
931 bool OnlyIfReduced =
false);
932 static Constant *getBitCast(Constant *
C,
Type *Ty,
933 bool OnlyIfReduced =
false);
934 static Constant *getAddrSpaceCast(Constant *
C,
Type *Ty,
935 bool OnlyIfReduced =
false);
937 static Constant *
getNSWNeg(Constant *
C) {
return getNeg(C,
false,
true); }
938 static Constant *
getNUWNeg(Constant *
C) {
return getNeg(C,
true,
false); }
939 static Constant *
getNSWAdd(Constant *C1, Constant *C2) {
940 return getAdd(C1, C2,
false,
true);
942 static Constant *
getNUWAdd(Constant *C1, Constant *C2) {
943 return getAdd(C1, C2,
true,
false);
945 static Constant *
getNSWSub(Constant *C1, Constant *C2) {
946 return getSub(C1, C2,
false,
true);
948 static Constant *
getNUWSub(Constant *C1, Constant *C2) {
949 return getSub(C1, C2,
true,
false);
951 static Constant *
getNSWMul(Constant *C1, Constant *C2) {
952 return getMul(C1, C2,
false,
true);
954 static Constant *
getNUWMul(Constant *C1, Constant *C2) {
955 return getMul(C1, C2,
true,
false);
957 static Constant *
getNSWShl(Constant *C1, Constant *C2) {
958 return getShl(C1, C2,
false,
true);
960 static Constant *
getNUWShl(Constant *C1, Constant *C2) {
961 return getShl(C1, C2,
true,
false);
964 return getSDiv(C1, C2,
true);
967 return getUDiv(C1, C2,
true);
970 return getAShr(C1, C2,
true);
973 return getLShr(C1, C2,
true);
979 static Constant *getBinOpIdentity(
unsigned Opcode,
Type *Ty);
985 static Constant *getBinOpAbsorber(
unsigned Opcode,
Type *Ty);
996 static Constant *getCast(
unsigned ops, Constant *
C,
Type *Ty,
997 bool OnlyIfReduced =
false);
1000 static Constant *getZExtOrBitCast(
1006 static Constant *getSExtOrBitCast(
1012 static Constant *getTruncOrBitCast(
1019 static Constant *getPointerCast(
1026 static Constant *getPointerBitCastOrAddrSpaceCast(
1032 static Constant *getIntegerCast(
1039 static Constant *getFPCast(
1045 bool isCast()
const;
1048 bool isCompare()
const;
1052 bool hasIndices()
const;
1059 bool isGEPWithNoNotionalOverIndexing()
const;
1064 static Constant *getSelect(Constant *
C, Constant *V1, Constant *
V2,
1065 Type *OnlyIfReducedTy =
nullptr);
1071 static Constant *
get(
unsigned Opcode, Constant *C1, Constant *C2,
1072 unsigned Flags = 0,
Type *OnlyIfReducedTy =
nullptr);
1077 static Constant *getCompare(
unsigned short pred, Constant *C1, Constant *C2,
1078 bool OnlyIfReduced =
false);
1083 static Constant *getICmp(
unsigned short pred, Constant *LHS, Constant *RHS,
1084 bool OnlyIfReduced =
false);
1085 static Constant *getFCmp(
unsigned short pred, Constant *LHS, Constant *RHS,
1086 bool OnlyIfReduced =
false);
1094 bool InBounds =
false,
1095 Type *OnlyIfReducedTy =
nullptr) {
1096 return getGetElementPtr(
1098 InBounds, OnlyIfReducedTy);
1101 bool InBounds =
false,
1102 Type *OnlyIfReducedTy =
nullptr) {
1106 return getGetElementPtr(Ty, C, cast<Value>(Idx), InBounds, OnlyIfReducedTy);
1108 static Constant *getGetElementPtr(
Type *Ty, Constant *
C,
1110 bool InBounds =
false,
1111 Type *OnlyIfReducedTy =
nullptr);
1117 return getGetElementPtr(Ty, C, IdxList,
true);
1124 return getGetElementPtr(Ty, C, Idx,
true);
1128 return getGetElementPtr(Ty, C, IdxList,
true);
1131 static Constant *getExtractElement(Constant *Vec, Constant *Idx,
1132 Type *OnlyIfReducedTy =
nullptr);
1133 static Constant *getInsertElement(Constant *Vec, Constant *Elt, Constant *Idx,
1134 Type *OnlyIfReducedTy =
nullptr);
1135 static Constant *getShuffleVector(Constant *V1, Constant *
V2, Constant *Mask,
1136 Type *OnlyIfReducedTy =
nullptr);
1138 Type *OnlyIfReducedTy =
nullptr);
1139 static Constant *getInsertValue(Constant *Agg, Constant *Val,
1141 Type *OnlyIfReducedTy =
nullptr);
1144 unsigned getOpcode()
const {
return getSubclassDataFromValue(); }
1148 unsigned getPredicate()
const;
1155 const char *getOpcodeName()
const;
1159 Constant *getWithOperandReplaced(
unsigned OpNo, Constant *Op)
const;
1165 return getWithOperands(Ops,
getType());
1178 bool OnlyIfReduced =
false)
const;
1198 void setValueSubclassData(
unsigned short D) {
1221 void *
operator new(size_t,
unsigned) =
delete;
1224 friend class Constant;
1225 void destroyConstantImpl();
1232 void *
operator new(
size_t s) {
1233 return User::operator
new(s, 0);
1247 UndefValue *getStructElement(
unsigned Elt)
const;
1255 UndefValue *getElementValue(
unsigned Idx)
const;
1258 unsigned getNumElements()
const;
static bool isValueValidForType(Type *Ty, uint64_t V)
This static method returns true if the type Ty is big enough to represent the value V...
ConstantDataVector - A vector constant whose element type is a simple 1/2/4/8-byte integer or float/d...
static ConstantInt * getFalse(LLVMContext &Context)
IntegerType * getType() const
getType - Specialize the getType() method to always return an IntegerType, which reduces the amount o...
static Constant * getString(LLVMContext &Context, StringRef Initializer, bool AddNull=true)
getString - This method constructs a CDS and initializes it with a text string.
APFloat getElementAsAPFloat(unsigned i) const
getElementAsAPFloat - If this is a sequential container of floating point type, return the specified ...
~ConstantDataSequential() override
uint64_t getZExtValue() const
Get zero extended value.
VectorType * getType() const
getType - Specialize the getType() method to always return a VectorType, which reduces the amount of ...
bool isNaN() const
Returns true if and only if the float is a quiet or signaling NaN.
size_t size() const
size - Get the string size.
static Constant * getNSWAdd(Constant *C1, Constant *C2)
static Constant * getNaN(Type *Ty, bool Negative=false, unsigned type=0)
static Constant * getInfinity(Type *Ty, bool Negative=false)
unsigned getBitWidth() const
getBitWidth - Return the bitwidth of this constant.
ConstantDataSequential(Type *ty, ValueTy VT, const char *Data)
bool isInfinity() const
isInfinity - Return true if the value is infinity
Constant * getElementAsConstant(unsigned i) const
getElementAsConstant - Return a Constant for a specified index's element.
static Constant * getExactSDiv(Constant *C1, Constant *C2)
Constant * getSplatValue() const
getSplatValue - If this is a splat constant, meaning that all of the elements have the same value...
static bool classof(const Value *V)
Methods for support type inquiry through isa, cast, and dyn_cast:
static Constant * getGetElementPtr(Type *Ty, Constant *C, ArrayRef< Constant * > IdxList, bool InBounds=false, Type *OnlyIfReducedTy=nullptr)
Getelementptr form.
StringRef substr(size_t Start, size_t N=npos) const
Return a reference to the substring from [Start, Start + N).
static Constant * getNUWShl(Constant *C1, Constant *C2)
uint64_t getLimitedValue(uint64_t Limit=~0ULL) const
If this value is smaller than the specified limit, return it, otherwise return the limit value...
static bool classof(const Value *V)
Methods for support type inquiry through isa, cast, and dyn_cast:
FunctionType * getType(LLVMContext &Context, ID id, ArrayRef< Type * > Tys=None)
Return the function type for an intrinsic.
unsigned getOpcode() const
getOpcode - Return the opcode at the root of this constant expression
bool isMinusOne() const
This function will return true iff every bit in this constant is set to true.
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Constant)
Transparently provide more efficient getOperand methods.
static bool classof(const Value *V)
Methods for support type inquiry through isa, cast, and dyn_cast:
bool isMinValue(bool isSigned) const
This function will return true iff this constant represents the smallest value that may be represente...
ArrayType * getType() const
getType - Specialize the getType() method to always return an ArrayType, which reduces the amount of ...
bool isNegative() const
Determine sign of this APInt.
bool uge(uint64_t Num) const
This function will return true iff this constant represents a value with active bits bigger than 64 b...
BlockAddress - The address of a basic block.
StringRef getAsCString() const
getAsCString - If this array is isCString(), then this method returns the array (without the trailing...
const APInt & getValue() const
Return the constant as an APInt value reference.
static Constant * getNegativeZero(Type *Ty)
ArrayRef< T > makeArrayRef(const T &OneElt)
Construct an ArrayRef from a single element.
UndefValue - 'undef' values are things that do not have specified contents.
Constant * getSequentialElement() const
getSequentialElement - If this CAZ has array or vector type, return a zero with the right element typ...
StructType - Class to represent struct types.
A Use represents the edge between a Value definition and its users.
static bool classof(const Value *V)
Methods for support type inquiry through isa, cast, and dyn_cast:
static Constant * getNUWNeg(Constant *C)
static Constant * getExactAShr(Constant *C1, Constant *C2)
double getElementAsDouble(unsigned i) const
getElementAsDouble - If this is an sequential container of doubles, return the specified element as a...
static bool classof(const Value *V)
Methods for support type inquiry through isa, cast, and dyn_cast:
ConstantAggregateZero(Type *ty)
static bool classof(const Value *V)
Methods for support type inquiry through isa, cast, and dyn_cast:
This file implements a class to represent arbitrary precision integral constant values and operations...
ConstantAggregateZero - All zero aggregate value.
uint64_t getZExtValue() const
Return the constant as a 64-bit unsigned integer value after it has been zero extended as appropriate...
ConstantPointerNull(PointerType *T)
#define DEFINE_TRANSPARENT_OPERAND_ACCESSORS(CLASS, VALUECLASS)
Macro for generating out-of-class operand accessor definitions.
ConstantExpr - a constant value that is initialized with an expression using other constant values...
static bool classof(const Value *V)
Methods for support type inquiry through isa, cast, and dyn_cast:
ConstantDataSequential - A vector or array constant whose element type is a simple 1/2/4/8-byte integ...
ArrayType - Class to represent array types.
uint64_t getLimitedValue(uint64_t Limit=~0ULL) const
getLimitedValue - If the value is smaller than the specified limit, return it, otherwise return the l...
static bool classof(const Value *V)
Methods for support type inquiry through isa, cast, and dyn_cast:
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
unsigned getActiveBits() const
Compute the number of active bits in the value.
SequentialType * getType() const
getType - Specialize the getType() method to always return a SequentialType, which reduces the amount...
bool isExactlyValue(double V) const
bool isZero() const
isZero - Return true if the value is positive or negative zero.
static Constant * getNSWNeg(Constant *C)
size_t size() const
size - Get the array size.
PointerType - Class to represent pointers.
static Constant * getGetElementPtr(Type *Ty, Constant *C, Constant *Idx, bool InBounds=false, Type *OnlyIfReducedTy=nullptr)
A self-contained host- and target-independent arbitrary-precision floating-point software implementat...
bool isNaN() const
isNaN - Return true if the value is a NaN.
static Constant * getInBoundsGetElementPtr(Type *Ty, Constant *C, ArrayRef< Constant * > IdxList)
Create an "inbounds" getelementptr.
ConstantExpr(Type *ty, unsigned Opcode, Use *Ops, unsigned NumOps)
static Constant * getImpl(StringRef Bytes, Type *Ty)
getImpl - This is the underlying implementation of all of the ConstantDataSequential::get methods...
ConstantDataArray - An array constant whose element type is a simple 1/2/4/8-byte integer or float/do...
LLVM Basic Block Representation.
The instances of the Type class are immutable: once they are created, they are never changed...
This is an important class for using LLVM in a threaded context.
static Constant * getFP(LLVMContext &Context, ArrayRef< uint16_t > Elts)
getFP() constructors - Return a constant with array type with an element count and element type of fl...
bool isMaxValue(bool isSigned) const
This function will return true iff this constant represents the largest value that may be represented...
This is an important base class in LLVM.
bool isMaxSignedValue() const
Determine if this is the largest signed value.
uint64_t getElementByteSize() const
getElementByteSize - Return the size (in bytes) of each element in the array/vector.
int64_t getSExtValue() const
Get sign extended value.
StringRef getAsString() const
getAsString - If this array is isString(), then this method returns the array as a StringRef...
StringRef getRawDataValues() const
getRawDataValues - Return the raw, underlying, bytes of this data.
static Constant * getFP(LLVMContext &Context, ArrayRef< uint16_t > Elts)
getFP() constructors - Return a constant with vector type with an element count and element type of f...
ConstantFP - Floating Point Values [float, double].
static Constant * getNSWShl(Constant *C1, Constant *C2)
This file declares a class to represent arbitrary precision floating point values and provide a varie...
unsigned getBitWidth() const
Return the number of bits in the APInt.
unsigned getValueID() const
Return an ID for the concrete type of this object.
opStatus convert(const fltSemantics &, roundingMode, bool *)
APFloat::convert - convert a value of one floating point type to another.
static bool classof(const Value *V)
Methods for support type inquiry through isa, cast, and dyn_cast:
bool isMaxValue() const
Determine if this is the largest unsigned value.
static bool isValueValidForType(Type *Ty, const APFloat &V)
isValueValidForType - return true if Ty is big enough to represent V.
static bool classof(const Value *V)
Methods to support type inquiry through isa, cast, and dyn_cast.
Class to represent integer types.
ConstantVector - Constant Vector Declarations.
static Constant * getSplat(unsigned NumElts, Constant *Elt)
getSplat - Return a ConstantVector with the specified constant in each element.
uint64_t getElementAsInteger(unsigned i) const
getElementAsInteger - If this is a sequential container of integers (of any size), return the specified element in the low bits of a uint64_t.
#define DECLARE_TRANSPARENT_OPERAND_ACCESSORS(VALUECLASS)
Macro for generating in-class operand accessor declarations.
#define LLVM_END_WITH_NULL
static Constant * getInBoundsGetElementPtr(Type *Ty, Constant *C, Constant *Idx)
bool isCString() const
isCString - This method returns true if the array "isString", ends with a nul byte, and does not contains any other nul bytes.
SequentialType - This is the superclass of the array, pointer and vector type classes.
static bool classof(const Value *V)
Methods for support type inquiry through isa, cast, and dyn_cast:
ArrayType * getType() const
getType - Specialize the getType() method to always return an ArrayType, which reduces the amount of ...
This is the shared class of boolean and integer constants.
bool isNegative() const
IEEE-754R isSignMinus: Returns true if and only if the current value is negative. ...
Type * getType() const
All values are typed, get the type of this value.
ConstantPointerNull - a constant pointer value that points to null.
static Constant * getNUWMul(Constant *C1, Constant *C2)
BasicBlock * getBasicBlock() const
static Constant * getNSWSub(Constant *C1, Constant *C2)
bool equalsInt(uint64_t V) const
A helper method that can be used to determine if the constant contained within is equal to a constant...
static ConstantInt * getSigned(IntegerType *Ty, int64_t V)
Return a ConstantInt with the specified value for the specified type.
static bool classof(const Value *V)
Methods for support type inquiry through isa, cast, and dyn_cast:
bool isZero() const
This is just a convenience method to make client code smaller for a common code.
static ConstantInt * getTrue(LLVMContext &Context)
ValueTy
Concrete subclass of this.
void setValueSubclassData(unsigned short D)
static BlockAddress * lookup(const BasicBlock *BB)
Lookup an existing BlockAddress constant for the given BasicBlock.
VectorType - Class to represent vector types.
ConstantArray - Constant Array Declarations.
Class for arbitrary precision integers.
static Constant * getInBoundsGetElementPtr(Type *Ty, Constant *C, ArrayRef< Value * > IdxList)
unsigned getNumElements() const
Return the number of elements in the array, vector, or struct.
static Constant * getAnon(LLVMContext &Ctx, ArrayRef< Constant * > V, bool Packed=false)
StructType * getType() const
getType() specialization - Reduce amount of casting...
static bool isElementTypeCompatible(const Type *Ty)
isElementTypeCompatible - Return true if a ConstantDataSequential can be formed with a vector or arra...
bool isMinValue() const
Determine if this is the smallest unsigned value.
bool isAllOnesValue() const
Determine if all bits are set.
bool isNegative() const
isNegative - Return true if the sign bit is set.
Constant * getElementValue(Constant *C) const
getElementValue - Return a zero of the right value for the specified GEP index.
static Constant * getNSWMul(Constant *C1, Constant *C2)
bool isMinSignedValue() const
Determine if this is the smallest signed value.
float getElementAsFloat(unsigned i) const
getElementAsFloat - If this is an sequential container of floats, return the specified element as a f...
static Constant * getExactLShr(Constant *C1, Constant *C2)
static Constant * getZeroValueForNegation(Type *Ty)
Floating point negation must be implemented with f(x) = -0.0 - x.
unsigned getNumElements() const
getNumElements - Return the number of elements in the array or vector.
Compile-time customization of User operands.
bool isString() const
isString - This method returns true if this is an array of i8.
PointerType * getType() const
getType - Specialize the getType() method to always return an PointerType, which reduces the amount o...
const APFloat & getValueAPF() const
VectorType * getType() const
getType - Specialize the getType() method to always return a VectorType, which reduces the amount of ...
bool isExactlyValue(const APFloat &V) const
isExactlyValue - We don't rely on operator== working on double values, as it returns true for things ...
Type * getElementType() const
getElementType - Return the element type of the array/vector.
Function * getFunction() const
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value)
Transparently provide more efficient getOperand methods.
LLVM Value Representation.
bool isZero() const
Returns true if and only if the float is plus or minus zero.
bool isInfinity() const
IEEE-754R isInfinite(): Returns true if and only if the float is infinity.
Constant * getStructElement(unsigned Elt) const
getStructElement - If this CAZ has struct type, return a zero with the right element type for the spe...
C - The default llvm calling convention, compatible with C.
StringRef - Represent a constant reference to a string, i.e.
FixedNumOperandTraits - determine the allocation regime of the Use array when it is a prefix to the U...
static Constant * getExactUDiv(Constant *C1, Constant *C2)
static bool classof(const Value *V)
Methods for support type inquiry through isa, cast, and dyn_cast:
VariadicOperandTraits - determine the allocation regime of the Use array when it is a prefix to the U...
static Constant * getNUWSub(Constant *C1, Constant *C2)
int64_t getSExtValue() const
Return the constant as a 64-bit integer value after it has been sign extended as appropriate for the ...
static Constant * getNUWAdd(Constant *C1, Constant *C2)
Constant * getWithOperands(ArrayRef< Constant * > Ops) const
getWithOperands - This returns the current constant expression with the operands replaced with the sp...
const fltSemantics & getSemantics() const
bool isOne() const
This is just a convenience method to make client code smaller for a common case.