21 #ifndef LLVM_IR_CONSTANTS_H
22 #define LLVM_IR_CONSTANTS_H
60 void anchor()
override;
69 void *
operator new(
size_t s) {
return User::operator
new(s, 0); }
75 void *
operator new(size_t,
unsigned) =
delete;
79 return V->
getValueID() >= ConstantDataFirstVal &&
95 void anchor()
override;
96 void destroyConstantImpl();
108 static Constant *
get(
Type *Ty, uint64_t V,
bool isSigned =
false);
117 bool isSigned =
false);
247 bool uge(uint64_t Num)
const {
276 void anchor()
override;
277 void destroyConstantImpl();
344 void destroyConstantImpl();
372 return V->
getValueID() == ConstantAggregateZeroVal;
397 return V->
getValueID() >= ConstantAggregateFirstVal &&
417 void destroyConstantImpl();
449 void destroyConstantImpl();
470 bool Packed =
false);
474 bool Packed =
false);
496 void destroyConstantImpl();
535 void destroyConstantImpl();
551 return V->
getValueID() == ConstantPointerNullVal;
570 const char *DataElements;
578 void destroyConstantImpl();
582 :
ConstantData(ty, VT), DataElements(Data), Next(nullptr) {}
662 return V->
getValueID() == ConstantDataArrayVal ||
667 const char *getElementPointer(
unsigned Elt)
const;
683 void *
operator new(
size_t s) {
684 return User::operator
new(s, 0);
687 void anchor()
override;
690 ConstantDataArray(
const ConstantDataArray &) =
delete;
692 void *
operator new(size_t,
unsigned) =
delete;
719 bool AddNull =
true);
729 return V->
getValueID() == ConstantDataArrayVal;
746 void *
operator new(
size_t s) {
747 return User::operator
new(s, 0);
750 void anchor()
override;
753 ConstantDataVector(
const ConstantDataVector &) =
delete;
755 void *
operator new(size_t,
unsigned) =
delete;
793 return V->
getValueID() == ConstantDataVectorVal;
806 void destroyConstantImpl();
816 return V->
getValueID() == ConstantTokenNoneVal;
827 void *
operator new(
size_t s) {
return User::operator
new(s, 2); }
829 void destroyConstantImpl();
833 void *
operator new(size_t,
unsigned) =
delete;
875 friend class Constant;
877 void destroyConstantImpl();
882 : Constant(ty, ConstantExprVal, Ops, NumOps) {
884 setValueSubclassData(Opcode);
895 static Constant *getAlignOf(
Type *Ty);
901 static Constant *getSizeOf(
Type *Ty);
906 static Constant *getOffsetOf(
StructType *STy,
unsigned FieldNo);
911 static Constant *getOffsetOf(
Type *Ty, Constant *FieldNo);
913 static Constant *getNeg(Constant *
C,
bool HasNUW =
false,
bool HasNSW =
false);
914 static Constant *getFNeg(Constant *
C);
915 static Constant *getNot(Constant *
C);
916 static Constant *getAdd(Constant *C1, Constant *C2,
917 bool HasNUW =
false,
bool HasNSW =
false);
918 static Constant *getFAdd(Constant *C1, Constant *C2);
919 static Constant *getSub(Constant *C1, Constant *C2,
920 bool HasNUW =
false,
bool HasNSW =
false);
921 static Constant *getFSub(Constant *C1, Constant *C2);
922 static Constant *getMul(Constant *C1, Constant *C2,
923 bool HasNUW =
false,
bool HasNSW =
false);
924 static Constant *getFMul(Constant *C1, Constant *C2);
925 static Constant *getUDiv(Constant *C1, Constant *C2,
bool isExact =
false);
926 static Constant *getSDiv(Constant *C1, Constant *C2,
bool isExact =
false);
927 static Constant *getFDiv(Constant *C1, Constant *C2);
928 static Constant *getURem(Constant *C1, Constant *C2);
929 static Constant *getSRem(Constant *C1, Constant *C2);
930 static Constant *getFRem(Constant *C1, Constant *C2);
931 static Constant *getAnd(Constant *C1, Constant *C2);
932 static Constant *getOr(Constant *C1, Constant *C2);
933 static Constant *getXor(Constant *C1, Constant *C2);
934 static Constant *getShl(Constant *C1, Constant *C2,
935 bool HasNUW =
false,
bool HasNSW =
false);
936 static Constant *getLShr(Constant *C1, Constant *C2,
bool isExact =
false);
937 static Constant *getAShr(Constant *C1, Constant *C2,
bool isExact =
false);
938 static Constant *getTrunc(Constant *
C,
Type *Ty,
bool OnlyIfReduced =
false);
939 static Constant *getSExt(Constant *
C,
Type *Ty,
bool OnlyIfReduced =
false);
940 static Constant *getZExt(Constant *
C,
Type *Ty,
bool OnlyIfReduced =
false);
941 static Constant *getFPTrunc(Constant *
C,
Type *Ty,
942 bool OnlyIfReduced =
false);
943 static Constant *getFPExtend(Constant *
C,
Type *Ty,
944 bool OnlyIfReduced =
false);
945 static Constant *getUIToFP(Constant *
C,
Type *Ty,
bool OnlyIfReduced =
false);
946 static Constant *getSIToFP(Constant *
C,
Type *Ty,
bool OnlyIfReduced =
false);
947 static Constant *getFPToUI(Constant *
C,
Type *Ty,
bool OnlyIfReduced =
false);
948 static Constant *getFPToSI(Constant *
C,
Type *Ty,
bool OnlyIfReduced =
false);
949 static Constant *getPtrToInt(Constant *
C,
Type *Ty,
950 bool OnlyIfReduced =
false);
951 static Constant *getIntToPtr(Constant *
C,
Type *Ty,
952 bool OnlyIfReduced =
false);
953 static Constant *getBitCast(Constant *
C,
Type *Ty,
954 bool OnlyIfReduced =
false);
955 static Constant *getAddrSpaceCast(Constant *
C,
Type *Ty,
956 bool OnlyIfReduced =
false);
958 static Constant *
getNSWNeg(Constant *
C) {
return getNeg(C,
false,
true); }
959 static Constant *
getNUWNeg(Constant *
C) {
return getNeg(C,
true,
false); }
961 static Constant *
getNSWAdd(Constant *C1, Constant *C2) {
962 return getAdd(C1, C2,
false,
true);
965 static Constant *
getNUWAdd(Constant *C1, Constant *C2) {
966 return getAdd(C1, C2,
true,
false);
969 static Constant *
getNSWSub(Constant *C1, Constant *C2) {
970 return getSub(C1, C2,
false,
true);
973 static Constant *
getNUWSub(Constant *C1, Constant *C2) {
974 return getSub(C1, C2,
true,
false);
977 static Constant *
getNSWMul(Constant *C1, Constant *C2) {
978 return getMul(C1, C2,
false,
true);
981 static Constant *
getNUWMul(Constant *C1, Constant *C2) {
982 return getMul(C1, C2,
true,
false);
985 static Constant *
getNSWShl(Constant *C1, Constant *C2) {
986 return getShl(C1, C2,
false,
true);
989 static Constant *
getNUWShl(Constant *C1, Constant *C2) {
990 return getShl(C1, C2,
true,
false);
994 return getSDiv(C1, C2,
true);
998 return getUDiv(C1, C2,
true);
1002 return getAShr(C1, C2,
true);
1006 return getLShr(C1, C2,
true);
1012 static Constant *getBinOpIdentity(
unsigned Opcode,
Type *Ty);
1018 static Constant *getBinOpAbsorber(
unsigned Opcode,
Type *Ty);
1029 static Constant *getCast(
unsigned ops, Constant *
C,
Type *Ty,
1030 bool OnlyIfReduced =
false);
1033 static Constant *getZExtOrBitCast(
1039 static Constant *getSExtOrBitCast(
1045 static Constant *getTruncOrBitCast(
1052 static Constant *getPointerCast(
1059 static Constant *getPointerBitCastOrAddrSpaceCast(
1065 static Constant *getIntegerCast(
1072 static Constant *getFPCast(
1078 bool isCast()
const;
1081 bool isCompare()
const;
1085 bool hasIndices()
const;
1092 bool isGEPWithNoNotionalOverIndexing()
const;
1097 static Constant *getSelect(Constant *
C, Constant *V1, Constant *
V2,
1098 Type *OnlyIfReducedTy =
nullptr);
1104 static Constant *
get(
unsigned Opcode, Constant *C1, Constant *C2,
1105 unsigned Flags = 0,
Type *OnlyIfReducedTy =
nullptr);
1110 static Constant *getCompare(
unsigned short pred, Constant *C1, Constant *C2,
1111 bool OnlyIfReduced =
false);
1116 static Constant *getICmp(
unsigned short pred, Constant *LHS, Constant *RHS,
1117 bool OnlyIfReduced =
false);
1118 static Constant *getFCmp(
unsigned short pred, Constant *LHS, Constant *RHS,
1119 bool OnlyIfReduced =
false);
1128 bool InBounds =
false,
1130 Type *OnlyIfReducedTy =
nullptr) {
1131 return getGetElementPtr(
1133 InBounds, InRangeIndex, OnlyIfReducedTy);
1136 bool InBounds =
false,
1138 Type *OnlyIfReducedTy =
nullptr) {
1142 return getGetElementPtr(Ty, C, cast<Value>(Idx), InBounds, InRangeIndex,
1145 static Constant *getGetElementPtr(
Type *Ty, Constant *
C,
1147 bool InBounds =
false,
1149 Type *OnlyIfReducedTy =
nullptr);
1155 return getGetElementPtr(Ty, C, IdxList,
true);
1162 return getGetElementPtr(Ty, C, Idx,
true);
1166 return getGetElementPtr(Ty, C, IdxList,
true);
1169 static Constant *getExtractElement(Constant *Vec, Constant *Idx,
1170 Type *OnlyIfReducedTy =
nullptr);
1171 static Constant *getInsertElement(Constant *Vec, Constant *Elt, Constant *Idx,
1172 Type *OnlyIfReducedTy =
nullptr);
1173 static Constant *getShuffleVector(Constant *V1, Constant *
V2, Constant *
Mask,
1174 Type *OnlyIfReducedTy =
nullptr);
1176 Type *OnlyIfReducedTy =
nullptr);
1177 static Constant *getInsertValue(Constant *Agg, Constant *Val,
1179 Type *OnlyIfReducedTy =
nullptr);
1182 unsigned getOpcode()
const {
return getSubclassDataFromValue(); }
1186 unsigned getPredicate()
const;
1193 const char *getOpcodeName()
const;
1197 Constant *getWithOperandReplaced(
unsigned OpNo, Constant *
Op)
const;
1203 return getWithOperands(Ops,
getType());
1216 bool OnlyIfReduced =
false,
1217 Type *SrcTy =
nullptr)
const;
1236 void setValueSubclassData(
unsigned short D) {
1263 void destroyConstantImpl();
1277 UndefValue *getStructElement(
unsigned Elt)
const;
1284 UndefValue *getElementValue(
unsigned Idx)
const;
1287 unsigned getNumElements()
const;
1297 #endif // LLVM_IR_CONSTANTS_H
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...
A vector constant whose element type is a simple 1/2/4/8-byte integer or float/double, and whose elements are just simple data values (i.e.
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)
This method constructs a CDS and initializes it with a text string.
APFloat getElementAsAPFloat(unsigned i) const
If this is a sequential container of floating point type, return the specified element as an APFloat...
~ConstantDataSequential() override
uint64_t getZExtValue() const
Get zero extended value.
VectorType * getType() const
Specialize the getType() method to always return a VectorType, which reduces the amount of casting ne...
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)
static Constant * getAnon(ArrayRef< Constant * > V, bool Packed=false)
Return an anonymous struct that has the specified elements.
unsigned getBitWidth() const
getBitWidth - Return the bitwidth of this constant.
ConstantDataSequential(Type *ty, ValueTy VT, const char *Data)
bool isInfinity() const
Return true if the value is infinity.
Constant * getElementAsConstant(unsigned i) const
Return a Constant for a specified index's element.
static Constant * getExactSDiv(Constant *C1, Constant *C2)
Constant * getSplatValue() const
If this is a splat constant, meaning that all of the elements have the same value, return that 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, Optional< unsigned > InRangeIndex=None, Type *OnlyIfReducedTy=nullptr)
Getelementptr form.
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
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.
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
Specialize the getType() method to always return an ArrayType, which reduces the amount of casting ne...
ConstantAggregate(CompositeType *T, ValueTy VT, ArrayRef< Constant * > V)
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...
The address of a basic block.
struct fuzzer::@269 Flags
StringRef getAsCString() const
If this array is isCString(), then this method returns the array (without the trailing null byte) as ...
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.
'undef' values are things that do not have specified contents.
Constant * getSequentialElement() const
If this CAZ has array or vector type, return a zero with the right element type.
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 GCRegistry::Add< StatepointGC > D("statepoint-example","an example strategy for statepoint")
static Constant * getExactAShr(Constant *C1, Constant *C2)
double getElementAsDouble(unsigned i) const
If this is an sequential container of doubles, return the specified element as a double.
static bool classof(const Value *V)
Methods for support type inquiry through isa, cast, and dyn_cast:
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...
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...
#define DEFINE_TRANSPARENT_OPERAND_ACCESSORS(CLASS, VALUECLASS)
Macro for generating out-of-class operand accessor definitions.
static StructType * getTypeForElements(ArrayRef< Constant * > V, bool Packed=false)
Return an anonymous struct type to use for a constant with the specified set of elements.
A constant value that is initialized with an expression using other constant values.
opStatus convert(const fltSemantics &ToSemantics, roundingMode RM, bool *losesInfo)
static bool classof(const Value *V)
Methods to support type inquiry through isa, cast, and dyn_cast.
static Constant * getGetElementPtr(Type *Ty, Constant *C, Constant *Idx, bool InBounds=false, Optional< unsigned > InRangeIndex=None, Type *OnlyIfReducedTy=nullptr)
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...
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...
Function Alias Analysis false
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
Specialize the getType() method to always return a SequentialType, which reduces the amount of castin...
bool isExactlyValue(double V) const
bool isZero() const
Return true if the value is positive or negative zero.
static Constant * getNSWNeg(Constant *C)
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE size_t size() const
size - Get the string size.
size_t size() const
size - Get the array size.
Class to represent pointers.
bool isNaN() const
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)
This is the underlying implementation of all of the ConstantDataSequential::get methods.
An array constant whose element type is a simple 1/2/4/8-byte integer or float/double, and whose elements are just simple data values (i.e.
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...
A constant token which is empty.
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
Return the size (in bytes) of each element in the array/vector.
int64_t getSExtValue() const
Get sign extended value.
StringRef getAsString() const
If this array is isString(), then this method returns the array as a StringRef.
StringRef getRawDataValues() const
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].
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE StringRef substr(size_t Start, size_t N=npos) const
Return a reference to the substring from [Start, Start + N).
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.
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)
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.
Constant Vector Declarations.
static Constant * getSplat(unsigned NumElts, Constant *Elt)
Return a ConstantVector with the specified constant in each element.
static bool isElementTypeCompatible(Type *Ty)
Return true if a ConstantDataSequential can be formed with a vector or array of the specified element...
uint64_t getElementAsInteger(unsigned i) const
If this is a sequential container of integers (of any size), return the specified element in the low ...
#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)
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
bool isCString() const
This method returns true if the array "isString", ends with a null byte, and does not contains any ot...
This is the superclass of the array and vector type classes.
static bool classof(const Value *V)
Methods for support type inquiry through isa, cast, and dyn_cast:
static Constant * getSplat(unsigned NumElts, Constant *Elt)
Return a ConstantVector with the specified constant in each element.
ArrayType * getType() const
Specialize the getType() method to always return an ArrayType, which reduces the amount of casting ne...
This is the shared class of boolean and integer constants.
Type * getType() const
All values are typed, get the type of this value.
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 GCRegistry::Add< ShadowStackGC > C("shadow-stack","Very portable GC for uncooperative code generators")
static BlockAddress * lookup(const BasicBlock *BB)
Lookup an existing BlockAddress constant for the given BasicBlock.
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
Specialization - reduce amount of casting.
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Constant)
Transparently provide more efficient getOperand methods.
bool isMinValue() const
Determine if this is the smallest unsigned value.
Common super class of ArrayType, StructType and VectorType.
static bool classof(const Value *V)
Methods for support type inquiry through isa, cast, and dyn_cast:
bool isAllOnesValue() const
Determine if all bits are set.
bool isNegative() const
Return true if the sign bit is set.
Constant * getElementValue(Constant *C) const
Return a zero of the right value for the specified GEP index if we can, otherwise return null (e...
static Constant * getNSWMul(Constant *C1, Constant *C2)
bool isMinSignedValue() const
Determine if this is the smallest signed value.
float getElementAsFloat(unsigned i) const
If this is an sequential container of floats, return the specified element as a float.
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
Return the number of elements in the array or vector.
Compile-time customization of User operands.
bool isString() const
This method returns true if this is an array of i8.
PointerType * getType() const
Specialize the getType() method to always return an PointerType, which reduces the amount of casting ...
static bool classof(const Value *V)
Methods to support type inquiry through isa, cast, and dyn_cast.
const APFloat & getValueAPF() const
VectorType * getType() const
Specialize the getType() method to always return a VectorType, which reduces the amount of casting ne...
bool isExactlyValue(const APFloat &V) const
We don't rely on operator== working on double values, as it returns true for things that are clearly ...
Type * getElementType() const
Return the element type of the array/vector.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
Function * getFunction() const
Base class for aggregate constants (with operands).
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value)
Transparently provide more efficient getOperand methods.
LLVM Value Representation.
std::underlying_type< E >::type Mask()
Get a bitmask with 1s in all places up to the high-order bit of E's largest value.
Constant * getStructElement(unsigned Elt) const
If this CAZ has struct type, return a zero with the right element type for the specified element...
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...
ConstantData(Type *Ty, ValueTy VT)
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 LazyValueInfoImpl & getImpl(void *&PImpl, AssumptionCache *AC, const DataLayout *DL, DominatorTree *DT=nullptr)
This lazily constructs the LazyValueInfoImpl.
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 ...
Base class for constants with no operands.
static Constant * getNUWAdd(Constant *C1, Constant *C2)
Constant * getWithOperands(ArrayRef< Constant * > Ops) const
This returns the current constant expression with the operands replaced with the specified values...
const fltSemantics & getSemantics() const
bool isOne() const
This is just a convenience method to make client code smaller for a common case.
Constant * getSplatValue() const
If this is a splat constant, meaning that all of the elements have the same value, return that value.