21 #ifndef LLVM_IR_CONSTANTS_H
22 #define LLVM_IR_CONSTANTS_H
68 void *
operator new(
size_t s) {
return User::operator
new(s, 0); }
75 return V->
getValueID() >= ConstantDataFirstVal &&
91 void destroyConstantImpl();
103 static Constant *
get(
Type *Ty, uint64_t V,
bool isSigned =
false);
112 bool isSigned =
false);
242 bool uge(uint64_t Num)
const {
271 void destroyConstantImpl();
338 void destroyConstantImpl();
366 return V->
getValueID() == ConstantAggregateZeroVal;
391 return V->
getValueID() >= ConstantAggregateFirstVal &&
411 void destroyConstantImpl();
443 void destroyConstantImpl();
450 template <
typename... Csts>
455 return get(
T, Values);
471 bool Packed =
false);
475 bool Packed =
false);
497 void destroyConstantImpl();
536 void destroyConstantImpl();
552 return V->
getValueID() == ConstantPointerNullVal;
571 const char *DataElements;
579 void destroyConstantImpl();
583 :
ConstantData(ty, VT), DataElements(Data), Next(nullptr) {}
639 bool isString(
unsigned CharSize = 8)
const;
667 return V->
getValueID() == ConstantDataArrayVal ||
672 const char *getElementPointer(
unsigned Elt)
const;
715 bool AddNull =
true);
725 return V->
getValueID() == ConstantDataArrayVal;
784 return V->
getValueID() == ConstantDataVectorVal;
797 void destroyConstantImpl();
807 return V->
getValueID() == ConstantTokenNoneVal;
818 void *
operator new(
size_t s) {
return User::operator
new(s, 2); }
820 void destroyConstantImpl();
864 friend class Constant;
866 void destroyConstantImpl();
871 : Constant(ty, ConstantExprVal, Ops, NumOps) {
873 setValueSubclassData(Opcode);
884 static Constant *getAlignOf(
Type *Ty);
890 static Constant *getSizeOf(
Type *Ty);
895 static Constant *getOffsetOf(
StructType *STy,
unsigned FieldNo);
900 static Constant *getOffsetOf(
Type *Ty, Constant *FieldNo);
902 static Constant *getNeg(Constant *
C,
bool HasNUW =
false,
bool HasNSW =
false);
903 static Constant *getFNeg(Constant *
C);
904 static Constant *getNot(Constant *
C);
905 static Constant *getAdd(Constant *C1, Constant *C2,
906 bool HasNUW =
false,
bool HasNSW =
false);
907 static Constant *getFAdd(Constant *C1, Constant *C2);
908 static Constant *getSub(Constant *C1, Constant *C2,
909 bool HasNUW =
false,
bool HasNSW =
false);
910 static Constant *getFSub(Constant *C1, Constant *C2);
911 static Constant *getMul(Constant *C1, Constant *C2,
912 bool HasNUW =
false,
bool HasNSW =
false);
913 static Constant *getFMul(Constant *C1, Constant *C2);
914 static Constant *getUDiv(Constant *C1, Constant *C2,
bool isExact =
false);
915 static Constant *getSDiv(Constant *C1, Constant *C2,
bool isExact =
false);
916 static Constant *getFDiv(Constant *C1, Constant *C2);
917 static Constant *getURem(Constant *C1, Constant *C2);
918 static Constant *getSRem(Constant *C1, Constant *C2);
919 static Constant *getFRem(Constant *C1, Constant *C2);
920 static Constant *getAnd(Constant *C1, Constant *C2);
921 static Constant *getOr(Constant *C1, Constant *C2);
922 static Constant *getXor(Constant *C1, Constant *C2);
923 static Constant *getShl(Constant *C1, Constant *C2,
924 bool HasNUW =
false,
bool HasNSW =
false);
925 static Constant *getLShr(Constant *C1, Constant *C2,
bool isExact =
false);
926 static Constant *getAShr(Constant *C1, Constant *C2,
bool isExact =
false);
927 static Constant *getTrunc(Constant *
C,
Type *Ty,
bool OnlyIfReduced =
false);
928 static Constant *getSExt(Constant *
C,
Type *Ty,
bool OnlyIfReduced =
false);
929 static Constant *getZExt(Constant *
C,
Type *Ty,
bool OnlyIfReduced =
false);
930 static Constant *getFPTrunc(Constant *
C,
Type *Ty,
931 bool OnlyIfReduced =
false);
932 static Constant *getFPExtend(Constant *
C,
Type *Ty,
933 bool OnlyIfReduced =
false);
934 static Constant *getUIToFP(Constant *
C,
Type *Ty,
bool OnlyIfReduced =
false);
935 static Constant *getSIToFP(Constant *
C,
Type *Ty,
bool OnlyIfReduced =
false);
936 static Constant *getFPToUI(Constant *
C,
Type *Ty,
bool OnlyIfReduced =
false);
937 static Constant *getFPToSI(Constant *
C,
Type *Ty,
bool OnlyIfReduced =
false);
938 static Constant *getPtrToInt(Constant *
C,
Type *Ty,
939 bool OnlyIfReduced =
false);
940 static Constant *getIntToPtr(Constant *
C,
Type *Ty,
941 bool OnlyIfReduced =
false);
942 static Constant *getBitCast(Constant *
C,
Type *Ty,
943 bool OnlyIfReduced =
false);
944 static Constant *getAddrSpaceCast(Constant *
C,
Type *Ty,
945 bool OnlyIfReduced =
false);
947 static Constant *
getNSWNeg(Constant *
C) {
return getNeg(C,
false,
true); }
948 static Constant *
getNUWNeg(Constant *
C) {
return getNeg(C,
true,
false); }
950 static Constant *
getNSWAdd(Constant *C1, Constant *C2) {
951 return getAdd(C1, C2,
false,
true);
954 static Constant *
getNUWAdd(Constant *C1, Constant *C2) {
955 return getAdd(C1, C2,
true,
false);
958 static Constant *
getNSWSub(Constant *C1, Constant *C2) {
959 return getSub(C1, C2,
false,
true);
962 static Constant *
getNUWSub(Constant *C1, Constant *C2) {
963 return getSub(C1, C2,
true,
false);
966 static Constant *
getNSWMul(Constant *C1, Constant *C2) {
967 return getMul(C1, C2,
false,
true);
970 static Constant *
getNUWMul(Constant *C1, Constant *C2) {
971 return getMul(C1, C2,
true,
false);
974 static Constant *
getNSWShl(Constant *C1, Constant *C2) {
975 return getShl(C1, C2,
false,
true);
978 static Constant *
getNUWShl(Constant *C1, Constant *C2) {
979 return getShl(C1, C2,
true,
false);
983 return getSDiv(C1, C2,
true);
987 return getUDiv(C1, C2,
true);
991 return getAShr(C1, C2,
true);
995 return getLShr(C1, C2,
true);
1001 static Constant *getBinOpIdentity(
unsigned Opcode,
Type *Ty);
1007 static Constant *getBinOpAbsorber(
unsigned Opcode,
Type *Ty);
1018 static Constant *getCast(
unsigned ops, Constant *
C,
Type *Ty,
1019 bool OnlyIfReduced =
false);
1022 static Constant *getZExtOrBitCast(
1028 static Constant *getSExtOrBitCast(
1034 static Constant *getTruncOrBitCast(
1041 static Constant *getPointerCast(
1048 static Constant *getPointerBitCastOrAddrSpaceCast(
1054 static Constant *getIntegerCast(
1061 static Constant *getFPCast(
1067 bool isCast()
const;
1070 bool isCompare()
const;
1074 bool hasIndices()
const;
1081 bool isGEPWithNoNotionalOverIndexing()
const;
1086 static Constant *getSelect(Constant *
C, Constant *V1, Constant *
V2,
1087 Type *OnlyIfReducedTy =
nullptr);
1093 static Constant *
get(
unsigned Opcode, Constant *C1, Constant *C2,
1094 unsigned Flags = 0,
Type *OnlyIfReducedTy =
nullptr);
1099 static Constant *getCompare(
unsigned short pred, Constant *C1, Constant *C2,
1100 bool OnlyIfReduced =
false);
1105 static Constant *getICmp(
unsigned short pred, Constant *LHS, Constant *RHS,
1106 bool OnlyIfReduced =
false);
1107 static Constant *getFCmp(
unsigned short pred, Constant *LHS, Constant *RHS,
1108 bool OnlyIfReduced =
false);
1117 bool InBounds =
false,
1119 Type *OnlyIfReducedTy =
nullptr) {
1120 return getGetElementPtr(
1122 InBounds, InRangeIndex, OnlyIfReducedTy);
1125 bool InBounds =
false,
1127 Type *OnlyIfReducedTy =
nullptr) {
1131 return getGetElementPtr(Ty, C, cast<Value>(Idx), InBounds, InRangeIndex,
1134 static Constant *getGetElementPtr(
Type *Ty, Constant *
C,
1136 bool InBounds =
false,
1138 Type *OnlyIfReducedTy =
nullptr);
1144 return getGetElementPtr(Ty, C, IdxList,
true);
1151 return getGetElementPtr(Ty, C, Idx,
true);
1155 return getGetElementPtr(Ty, C, IdxList,
true);
1158 static Constant *getExtractElement(Constant *Vec, Constant *Idx,
1159 Type *OnlyIfReducedTy =
nullptr);
1160 static Constant *getInsertElement(Constant *Vec, Constant *Elt, Constant *Idx,
1161 Type *OnlyIfReducedTy =
nullptr);
1162 static Constant *getShuffleVector(Constant *V1, Constant *
V2, Constant *
Mask,
1163 Type *OnlyIfReducedTy =
nullptr);
1165 Type *OnlyIfReducedTy =
nullptr);
1166 static Constant *getInsertValue(Constant *Agg, Constant *Val,
1168 Type *OnlyIfReducedTy =
nullptr);
1171 unsigned getOpcode()
const {
return getSubclassDataFromValue(); }
1175 unsigned getPredicate()
const;
1182 const char *getOpcodeName()
const;
1186 Constant *getWithOperandReplaced(
unsigned OpNo, Constant *
Op)
const;
1192 return getWithOperands(Ops,
getType());
1205 bool OnlyIfReduced =
false,
1206 Type *SrcTy =
nullptr)
const;
1225 void setValueSubclassData(
unsigned short D) {
1252 void destroyConstantImpl();
1266 UndefValue *getStructElement(
unsigned Elt)
const;
1273 UndefValue *getElementValue(
unsigned Idx)
const;
1276 unsigned getNumElements()
const;
1286 #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...
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)
bool isOneValue() const
Determine if this is a value of 1.
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)
static bool classof(const Value *V)
Methods for support type inquiry through isa, cast, and dyn_cast:
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.
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.
uint64_t getLimitedValue(uint64_t Limit=UINT64_MAX) const
If this value is smaller than the specified limit, return it, otherwise return the limit value...
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
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...
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)...
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.
bool isString(unsigned CharSize=8) const
This method returns true if this is an array of CharSize integers.
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.
bool uge(const APInt &RHS) const
Unsigned greater or equal comparison.
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.
static wasm::ValType getType(const TargetRegisterClass *RC)
static Constant * getInBoundsGetElementPtr(Type *Ty, Constant *C, Constant *Idx)
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.
bool isSplat() const
Returns true if this is a splat constant, meaning that all elements have the same value...
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.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
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 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.
~ConstantDataSequential()
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:
llvm_unreachable("Unknown RegBank!")
static std::vector< std::string > Flags
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.
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 ...
APInt getElementAsAPInt(unsigned i) const
If this is a sequential container of integers (of any size), return the specified element as an APInt...
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.
traits class for checking whether type T is a base class for all the given types in the variadic list...
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...
bool isNullValue() const
Determine if all bits are clear.
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.