20#ifndef LLVM_IR_CONSTANTS_H
21#define LLVM_IR_CONSTANTS_H
46template <
class ConstantClass>
struct ConstantAggrKeyType;
68 void *
operator new(
size_t S) {
return User::operator
new(S, AllocMarker); }
71 void operator delete(
void *
Ptr) { User::operator
delete(
Ptr); }
77 static_assert(Value::ConstantDataFirstVal == 0,
78 "V->getValueID() >= Value::ConstantDataFirstVal");
79 return V->getValueID() <= ConstantDataLastVal;
95 void destroyConstantImpl();
124 bool IsSigned =
false);
132 return get(Ty, V,
true);
135 return get(Ty, V,
true);
270 return V->getValueID() == ConstantIntVal;
285 void destroyConstantImpl();
311 APInt *Payload =
nullptr);
313 APInt *Payload =
nullptr);
352 return V->getValueID() == ConstantFPVal;
365 void destroyConstantImpl();
393 return V->getValueID() == ConstantAggregateZeroVal;
419 return V->getValueID() >= ConstantAggregateFirstVal &&
420 V->getValueID() <= ConstantAggregateLastVal;
439 void destroyConstantImpl();
458 return V->getValueID() == ConstantArrayVal;
471 void destroyConstantImpl();
478 template <
typename... Csts>
490 bool Packed =
false) {
497 bool Packed =
false);
501 bool Packed =
false);
510 return V->getValueID() == ConstantStructVal;
523 void destroyConstantImpl();
551 return V->getValueID() == ConstantVectorVal;
564 void destroyConstantImpl();
580 return V->getValueID() == ConstantPointerNullVal;
599 const char *DataElements;
605 std::unique_ptr<ConstantDataSequential> Next;
607 void destroyConstantImpl();
678 return Str.drop_back();
688 return V->getValueID() == ConstantDataArrayVal ||
689 V->getValueID() == ConstantDataVectorVal;
693 const char *getElementPointer(
uint64_t Elt)
const;
714 template <
typename ElementTy>
716 const char *
Data =
reinterpret_cast<const char *
>(Elts.
data());
718 Type::getScalarTy<ElementTy>(
Context));
723 template <
typename ArrayTy>
766 return V->getValueID() == ConstantDataArrayVal;
783 mutable bool IsSplatSet : 1;
784 mutable bool IsSplat : 1;
785 bool isSplatData()
const;
843 return V->getValueID() == ConstantDataVectorVal;
856 void destroyConstantImpl();
866 return V->getValueID() == ConstantTokenNoneVal;
877 void destroyConstantImpl();
893 return V->getValueID() == ConstantTargetNoneVal;
906 void *
operator new(
size_t S) {
return User::operator
new(S, AllocMarker); }
908 void destroyConstantImpl();
909 Value *handleOperandChangeImpl(Value *
From, Value *To);
912 void operator delete(
void *
Ptr) { User::operator
delete(
Ptr); }
939 return V->getValueID() == BlockAddressVal;
959 void *
operator new(
size_t S) {
return User::operator
new(S, AllocMarker); }
961 void destroyConstantImpl();
962 Value *handleOperandChangeImpl(Value *
From, Value *To);
965 void operator delete(
void *
Ptr) { User::operator
delete(
Ptr); }
974 return cast<GlobalValue>(
Op<0>().
get());
979 return V->getValueID() == DSOLocalEquivalentVal;
998 void *
operator new(
size_t S) {
return User::operator
new(S, AllocMarker); }
1000 void destroyConstantImpl();
1001 Value *handleOperandChangeImpl(Value *
From, Value *To);
1011 return cast<GlobalValue>(
Op<0>().
get());
1021 return V->getValueID() == NoCFIValueVal;
1041 void *
operator new(
size_t s) {
return User::operator
new(s, AllocMarker); }
1043 void destroyConstantImpl();
1044 Value *handleOperandChangeImpl(Value *
From, Value *To);
1048 LLVM_ABI static ConstantPtrAuth *
get(Constant *
Ptr, ConstantInt *Key,
1049 ConstantInt *Disc, Constant *AddrDisc);
1053 LLVM_ABI ConstantPtrAuth *getWithSameSchema(Constant *Pointer)
const;
1066 return cast<ConstantInt>(
Op<2>().
get());
1073 return cast<Constant>(
Op<3>().
get());
1078 return !getAddrDiscriminator()->isNullValue();
1086 enum { AddrDiscriminator_CtorsDtors = 1 };
1098 const Value *Discriminator,
1103 return V->getValueID() == ConstantPtrAuthVal;
1124 void destroyConstantImpl();
1131 setValueSubclassData(Opcode);
1155 bool HasNUW =
false,
bool HasNSW =
false);
1157 bool HasNUW =
false,
bool HasNSW =
false);
1160 bool OnlyIfReduced =
false);
1162 bool OnlyIfReduced =
false);
1164 bool OnlyIfReduced =
false);
1166 bool OnlyIfReduced =
false);
1168 bool OnlyIfReduced =
false);
1170 bool OnlyIfReduced =
false);
1175 return getAdd(C1, C2,
false,
true);
1179 return getAdd(C1, C2,
true,
false);
1183 return getSub(C1, C2,
false,
true);
1187 return getSub(C1, C2,
true,
false);
1204 bool AllowRHSConstant =
false,
1213 bool AllowRHSConstant =
false,
1223 bool AllowLHSConstant =
false);
1235 bool OnlyIfReduced =
false);
1266 Type *OnlyIfReducedTy =
nullptr);
1276 std::optional<ConstantRange>
InRange = std::nullopt,
1277 Type *OnlyIfReducedTy =
nullptr) {
1278 return getGetElementPtr(
1285 std::optional<ConstantRange>
InRange = std::nullopt,
1286 Type *OnlyIfReducedTy =
nullptr) {
1290 return getGetElementPtr(Ty,
C, cast<Value>(
Idx), NW,
InRange,
1296 std::optional<ConstantRange>
InRange = std::nullopt,
1297 Type *OnlyIfReducedTy =
nullptr);
1318 Type *OnlyIfReducedTy =
nullptr);
1321 Type *OnlyIfReducedTy =
nullptr);
1324 Type *OnlyIfReducedTy =
nullptr);
1327 unsigned getOpcode()
const {
return getSubclassDataFromValue(); }
1346 return getWithOperands(Ops,
getType());
1359 bool OnlyIfReduced =
false,
1360 Type *SrcTy =
nullptr)
const;
1373 LLVM_ABI static bool isDesirableBinOp(
unsigned Opcode);
1377 LLVM_ABI static bool isSupportedBinOp(
unsigned Opcode);
1380 LLVM_ABI static bool isDesirableCastOp(
unsigned Opcode);
1383 LLVM_ABI static bool isSupportedCastOp(
unsigned Opcode);
1393 return V->getValueID() == ConstantExprVal;
1399 void setValueSubclassData(
unsigned short D) {
1425 void destroyConstantImpl();
1456 return V->getValueID() == UndefValueVal ||
1457 V->getValueID() == PoisonValueVal;
1473 void destroyConstantImpl();
1498 return V->getValueID() == PoisonValueVal;
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
This file declares a class to represent arbitrary precision floating point values and provide a varie...
This file implements a class to represent arbitrary precision integral constant values and operations...
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
BlockVerifier::State From
static GCRegistry::Add< StatepointGC > D("statepoint-example", "an example strategy for statepoint")
static StringRef getOpcodeName(uint8_t Opcode, uint8_t OpcodeBase)
Returns the sub type a function will return at a given Idx Should correspond to the result type of an ExtractValue instruction executed with just that one unsigned Idx
Looks at all the uses of the given value Returns the Liveness deduced from the uses of this value Adds all uses that cause the result to be MaybeLive to MaybeLiveRetUses If the result is MaybeLiveUses might be modified but its content should be ignored(since it might not be complete). DeadArgumentEliminationPass
Given that RA is a live value
static bool InRange(int64_t Value, unsigned short Shift, int LBound, int HBound)
#define DEFINE_TRANSPARENT_OPERAND_ACCESSORS(CLASS, VALUECLASS)
Macro for generating out-of-class operand accessor definitions.
static unsigned getNumElements(Type *Ty)
static SymbolRef::Type getType(const Symbol *Sym)
LLVM_ABI opStatus convert(const fltSemantics &ToSemantics, roundingMode RM, bool *losesInfo)
const fltSemantics & getSemantics() const
Class for arbitrary precision integers.
bool isMinSignedValue() const
Determine if this is the smallest signed value.
uint64_t getZExtValue() const
Get zero extended value.
bool isAllOnes() const
Determine if all bits are set. This is true for zero-width values.
bool isZero() const
Determine if this value is zero, i.e. all bits are clear.
unsigned getBitWidth() const
Return the number of bits in the APInt.
bool isMinValue() const
Determine if this is the smallest unsigned value.
bool isNegative() const
Determine sign of this APInt.
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.
bool isMaxSignedValue() const
Determine if this is the largest signed value.
bool isOne() const
Determine if this is a value of 1.
int64_t getSExtValue() const
Get sign extended value.
bool uge(const APInt &RHS) const
Unsigned greater or equal comparison.
bool isMaxValue() const
Determine if this is the largest unsigned value.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
size_t size() const
size - Get the array size.
Class to represent array types.
static LLVM_ABI ArrayType * get(Type *ElementType, uint64_t NumElements)
This static method is the primary way to construct an ArrayType.
LLVM Basic Block Representation.
const Function * getParent() const
Return the enclosing method, or null if none.
The address of a basic block.
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value)
Transparently provide more efficient getOperand methods.
static LLVM_ABI BlockAddress * lookup(const BasicBlock *BB)
Lookup an existing BlockAddress constant for the given BasicBlock.
static bool classof(const Value *V)
Methods for support type inquiry through isa, cast, and dyn_cast:
Function * getFunction() const
BasicBlock * getBasicBlock() const
static LLVM_ABI BlockAddress * get(Function *F, BasicBlock *BB)
Return a BlockAddress for the specified function and basic block.
All zero aggregate value.
LLVM_ABI ElementCount getElementCount() const
Return the number of elements in the array, vector, or struct.
ConstantAggregateZero(const ConstantAggregateZero &)=delete
static bool classof(const Value *V)
Methods for support type inquiry through isa, cast, and dyn_cast:
LLVM_ABI Constant * getSequentialElement() const
If this CAZ has array or vector type, return a zero with the right element type.
LLVM_ABI Constant * getElementValue(Constant *C) const
Return a zero of the right value for the specified GEP index if we can, otherwise return null (e....
LLVM_ABI Constant * getStructElement(unsigned Elt) const
If this CAZ has struct type, return a zero with the right element type for the specified element.
static LLVM_ABI ConstantAggregateZero * get(Type *Ty)
Base class for aggregate constants (with operands).
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:
ConstantArray - Constant Array Declarations.
static bool classof(const Value *V)
Methods for support type inquiry through isa, cast, and dyn_cast:
ArrayType * getType() const
Specialize the getType() method to always return an ArrayType, which reduces the amount of casting ne...
An array constant whose element type is a simple 1/2/4/8-byte integer or float/double,...
static bool classof(const Value *V)
Methods for support type inquiry through isa, cast, and dyn_cast:
static LLVM_ABI Constant * getString(LLVMContext &Context, StringRef Initializer, bool AddNull=true)
This method constructs a CDS and initializes it with a text string.
static Constant * get(LLVMContext &Context, ArrayRef< ElementTy > Elts)
get() constructor - Return a constant with array type with an element count and element type matching...
static LLVM_ABI Constant * getFP(Type *ElementType, ArrayRef< uint16_t > Elts)
getFP() constructors - Return a constant of array type with a float element type taken from argument ...
static Constant * get(LLVMContext &Context, ArrayTy &Elts)
get() constructor - ArrayTy needs to be compatible with ArrayRef<ElementTy>.
ConstantDataArray(const ConstantDataArray &)=delete
static Constant * getRaw(StringRef Data, uint64_t NumElements, Type *ElementTy)
getRaw() constructor - Return a constant with array type with an element count and element type match...
ArrayType * getType() const
Specialize the getType() method to always return an ArrayType, which reduces the amount of casting ne...
ConstantDataSequential - A vector or array constant whose element type is a simple 1/2/4/8-byte integ...
LLVM_ABI APFloat getElementAsAPFloat(uint64_t i) const
If this is a sequential container of floating point type, return the specified element as an APFloat.
LLVM_ABI uint64_t getElementAsInteger(uint64_t i) const
If this is a sequential container of integers (of any size), return the specified element in the low ...
StringRef getAsString() const
If this array is isString(), then this method returns the array as a StringRef.
LLVM_ABI Constant * getElementAsConstant(uint64_t i) const
Return a Constant for a specified index's element.
LLVM_ABI uint64_t getElementByteSize() const
Return the size (in bytes) of each element in the array/vector.
ConstantDataSequential(const ConstantDataSequential &)=delete
LLVM_ABI float getElementAsFloat(uint64_t i) const
If this is an sequential container of floats, return the specified element as a float.
LLVM_ABI bool isString(unsigned CharSize=8) const
This method returns true if this is an array of CharSize integers.
LLVM_ABI uint64_t getNumElements() const
Return the number of elements in the array or vector.
StringRef getAsCString() const
If this array is isCString(), then this method returns the array (without the trailing null byte) as ...
LLVM_ABI APInt getElementAsAPInt(uint64_t i) const
If this is a sequential container of integers (of any size), return the specified element as an APInt...
static LLVM_ABI Constant * getImpl(StringRef Bytes, Type *Ty)
This is the underlying implementation of all of the ConstantDataSequential::get methods.
LLVM_ABI double getElementAsDouble(uint64_t i) const
If this is an sequential container of doubles, return the specified element as a double.
LLVM_ABI Type * getElementType() const
Return the element type of the array/vector.
LLVM_ABI bool isCString() const
This method returns true if the array "isString", ends with a null byte, and does not contains any ot...
static bool classof(const Value *V)
Methods for support type inquiry through isa, cast, and dyn_cast:
LLVM_ABI StringRef getRawDataValues() const
Return the raw, underlying, bytes of this data.
static LLVM_ABI bool isElementTypeCompatible(Type *Ty)
Return true if a ConstantDataSequential can be formed with a vector or array of the specified element...
ConstantDataSequential(Type *ty, ValueTy VT, const char *Data)
A vector constant whose element type is a simple 1/2/4/8-byte integer or float/double,...
static Constant * getRaw(StringRef Data, uint64_t NumElements, Type *ElementTy)
getRaw() constructor - Return a constant with vector type with an element count and element type matc...
LLVM_ABI Constant * getSplatValue() const
If this is a splat constant, meaning that all of the elements have the same value,...
static LLVM_ABI Constant * getSplat(unsigned NumElts, Constant *Elt)
Return a ConstantVector with the specified constant in each element.
static bool classof(const Value *V)
Methods for support type inquiry through isa, cast, and dyn_cast:
LLVM_ABI bool isSplat() const
Returns true if this is a splat constant, meaning that all elements have the same value.
FixedVectorType * getType() const
Specialize the getType() method to always return a FixedVectorType, which reduces the amount of casti...
ConstantDataVector(const ConstantDataVector &)=delete
static LLVM_ABI Constant * get(LLVMContext &Context, ArrayRef< uint8_t > Elts)
get() constructors - Return a constant with vector type with an element count and element type matchi...
static LLVM_ABI Constant * getFP(Type *ElementType, ArrayRef< uint16_t > Elts)
getFP() constructors - Return a constant of vector type with a float element type taken from argument...
Base class for constants with no operands.
static bool classof(const Value *V)
Methods to support type inquiry through isa, cast, and dyn_cast.
ConstantData(const ConstantData &)=delete
ConstantData(Type *Ty, ValueTy VT)
A constant value that is initialized with an expression using other constant values.
ConstantExpr(Type *ty, unsigned Opcode, AllocInfo AllocInfo)
static bool classof(const Value *V)
Methods for support type inquiry through isa, cast, and dyn_cast:
static Constant * getNUWSub(Constant *C1, Constant *C2)
static Constant * getInBoundsGetElementPtr(Type *Ty, Constant *C, ArrayRef< Constant * > IdxList)
Create an "inbounds" getelementptr.
static Constant * getNSWAdd(Constant *C1, Constant *C2)
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Constant)
Transparently provide more efficient getOperand methods.
static bool isSupportedGetElementPtr(const Type *SrcElemTy)
Whether creating a constant expression for this getelementptr type is supported.
static Constant * getGetElementPtr(Type *Ty, Constant *C, Constant *Idx, GEPNoWrapFlags NW=GEPNoWrapFlags::none(), std::optional< ConstantRange > InRange=std::nullopt, Type *OnlyIfReducedTy=nullptr)
static Constant * getInBoundsGetElementPtr(Type *Ty, Constant *C, ArrayRef< Value * > IdxList)
static Constant * getNSWNeg(Constant *C)
static Constant * getNSWSub(Constant *C1, Constant *C2)
static Constant * getInBoundsGetElementPtr(Type *Ty, Constant *C, Constant *Idx)
static Constant * getNUWAdd(Constant *C1, Constant *C2)
unsigned getOpcode() const
Return the opcode at the root of this constant expression.
static Constant * getGetElementPtr(Type *Ty, Constant *C, ArrayRef< Constant * > IdxList, GEPNoWrapFlags NW=GEPNoWrapFlags::none(), std::optional< ConstantRange > InRange=std::nullopt, Type *OnlyIfReducedTy=nullptr)
Getelementptr form.
Constant * getWithOperands(ArrayRef< Constant * > Ops) const
This returns the current constant expression with the operands replaced with the specified values.
ConstantFP - Floating Point Values [float, double].
ConstantFP(const ConstantFP &)=delete
const APFloat & getValue() const
static LLVM_ABI Constant * getSNaN(Type *Ty, bool Negative=false, APInt *Payload=nullptr)
const APFloat & getValueAPF() const
static bool classof(const Value *V)
Methods for support type inquiry through isa, cast, and dyn_cast:
bool isInfinity() const
Return true if the value is infinity.
bool isNegative() const
Return true if the sign bit is set.
bool isExactlyValue(double V) const
static LLVM_ABI Constant * getInfinity(Type *Ty, bool Negative=false)
static LLVM_ABI Constant * getZero(Type *Ty, bool Negative=false)
static Constant * getNegativeZero(Type *Ty)
static LLVM_ABI Constant * getNaN(Type *Ty, bool Negative=false, uint64_t Payload=0)
bool isNaN() const
Return true if the value is a NaN.
LLVM_ABI 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 ...
static LLVM_ABI bool isValueValidForType(Type *Ty, const APFloat &V)
Return true if Ty is big enough to represent V.
static LLVM_ABI Constant * getQNaN(Type *Ty, bool Negative=false, APInt *Payload=nullptr)
bool isZero() const
Return true if the value is positive or negative zero.
This is the shared class of boolean and integer constants.
static Constant * getSigned(Type *Ty, int64_t V)
bool isMinusOne() const
This function will return true iff every bit in this constant is set to true.
bool isOne() const
This is just a convenience method to make client code smaller for a common case.
uint64_t getLimitedValue(uint64_t Limit=~0ULL) const
getLimitedValue - If the value is smaller than the specified limit, return it, otherwise return the l...
IntegerType * getIntegerType() const
Variant of the getType() method to always return an IntegerType, which reduces the amount of casting ...
static LLVM_ABI bool isValueValidForType(Type *Ty, uint64_t V)
This static method returns true if the type Ty is big enough to represent the value V.
static bool classof(const Value *V)
Methods to support type inquiry through isa, cast, and dyn_cast.
static LLVM_ABI ConstantInt * getTrue(LLVMContext &Context)
ConstantInt(const ConstantInt &)=delete
bool isZero() const
This is just a convenience method to make client code smaller for a common code.
MaybeAlign getMaybeAlignValue() const
Return the constant as an llvm::MaybeAlign.
static ConstantInt * getSigned(IntegerType *Ty, int64_t V)
Return a ConstantInt with the specified value for the specified type.
bool isMinValue(bool IsSigned) const
This function will return true iff this constant represents the smallest value that may be represente...
static LLVM_ABI ConstantInt * getFalse(LLVMContext &Context)
int64_t getSExtValue() const
Return the constant as a 64-bit integer value after it has been sign extended as appropriate for the ...
bool isMaxValue(bool IsSigned) const
This function will return true iff this constant represents the largest value that may be represented...
unsigned getBitWidth() const
getBitWidth - Return the scalar bitwidth of this constant.
uint64_t getZExtValue() const
Return the constant as a 64-bit unsigned integer value after it has been zero extended as appropriate...
Align getAlignValue() const
Return the constant as an llvm::Align, interpreting 0 as Align(1).
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...
const APInt & getValue() const
Return the constant as an APInt value reference.
bool uge(uint64_t Num) const
This function will return true iff this constant represents a value with active bits bigger than 64 b...
static LLVM_ABI ConstantInt * getBool(LLVMContext &Context, bool V)
A constant pointer value that points to null.
static bool classof(const Value *V)
Methods for support type inquiry through isa, cast, and dyn_cast:
static LLVM_ABI ConstantPointerNull * get(PointerType *T)
Static factory methods - Return objects of the specified value.
PointerType * getType() const
Specialize the getType() method to always return an PointerType, which reduces the amount of casting ...
ConstantPointerNull(const ConstantPointerNull &)=delete
A signed pointer, in the ptrauth sense.
Constant * getAddrDiscriminator() const
The address discriminator if any, or the null constant.
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Constant)
Transparently provide more efficient getOperand methods.
Constant * getPointer() const
The pointer that is signed in this ptrauth signed pointer.
ConstantInt * getKey() const
The Key ID, an i32 constant.
bool hasAddressDiscriminator() const
Whether there is any non-null address discriminator.
ConstantInt * getDiscriminator() const
The integer discriminator, an i64 constant, or 0.
static bool classof(const Value *V)
Methods for support type inquiry through isa, cast, and dyn_cast:
static Constant * getAnon(LLVMContext &Ctx, ArrayRef< Constant * > V, bool Packed=false)
static bool classof(const Value *V)
Methods for support type inquiry through isa, cast, and dyn_cast:
static LLVM_ABI Constant * get(StructType *T, ArrayRef< Constant * > V)
static LLVM_ABI StructType * getTypeForElements(ArrayRef< Constant * > V, bool Packed=false)
Return an anonymous struct type to use for a constant with the specified set of elements.
static std::enable_if_t< are_base_of< Constant, Csts... >::value, Constant * > get(StructType *T, Csts *...Vs)
StructType * getType() const
Specialization - reduce amount of casting.
static Constant * getAnon(ArrayRef< Constant * > V, bool Packed=false)
Return an anonymous struct that has the specified elements.
A constant target extension type default initializer.
static LLVM_ABI ConstantTargetNone * get(TargetExtType *T)
Static factory methods - Return objects of the specified value.
TargetExtType * getType() const
Specialize the getType() method to always return an TargetExtType, which reduces the amount of castin...
static bool classof(const Value *V)
Methods for support type inquiry through isa, cast, and dyn_cast.
ConstantTargetNone(const ConstantTargetNone &)=delete
A constant token which is empty.
ConstantTokenNone(const ConstantTokenNone &)=delete
static LLVM_ABI ConstantTokenNone * get(LLVMContext &Context)
Return the ConstantTokenNone.
static bool classof(const Value *V)
Methods to support type inquiry through isa, cast, and dyn_cast.
Constant Vector Declarations.
static bool classof(const Value *V)
Methods for support type inquiry through isa, cast, and dyn_cast:
FixedVectorType * getType() const
Specialize the getType() method to always return a FixedVectorType, which reduces the amount of casti...
LLVM_ABI Constant * getSplatValue(bool AllowPoison=false) const
If all elements of the vector constant have the same value, return that value.
static LLVM_ABI Constant * getSplat(ElementCount EC, Constant *Elt)
Return a ConstantVector with the specified constant in each element.
static LLVM_ABI Constant * get(ArrayRef< Constant * > V)
This is an important base class in LLVM.
Wrapper for a function that represents a value that functionally represents the original function.
static bool classof(const Value *V)
Methods for support type inquiry through isa, cast, and dyn_cast:
GlobalValue * getGlobalValue() const
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value)
Transparently provide more efficient getOperand methods.
This class represents an Operation in the Expression.
A parsed version of the target data layout string in and methods for querying it.
static constexpr ElementCount getFixed(ScalarTy MinVal)
Class to represent fixed width SIMD vectors.
Represents flags for the getelementptr instruction/expression.
static GEPNoWrapFlags inBounds()
static GEPNoWrapFlags none()
Class to represent integer types.
This is an important class for using LLVM in a threaded context.
Wrapper for a value that won't be replaced with a CFI jump table pointer in LowerTypeTestsModule.
static bool classof(const Value *V)
Methods for support type inquiry through isa, cast, and dyn_cast:
PointerType * getType() const
NoCFIValue is always a pointer.
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value)
Transparently provide more efficient getOperand methods.
GlobalValue * getGlobalValue() const
Class to represent pointers.
In order to facilitate speculative execution, many instructions do not invoke immediate undefined beh...
static LLVM_ABI PoisonValue * get(Type *T)
Static factory methods - Return an 'poison' object of the specified type.
PoisonValue(const PoisonValue &)=delete
static bool classof(const Value *V)
Methods for support type inquiry through isa, cast, and dyn_cast:
LLVM_ABI PoisonValue * getStructElement(unsigned Elt) const
If this poison has struct type, return a poison with the right element type for the specified element...
LLVM_ABI PoisonValue * getSequentialElement() const
If this poison has array or vector type, return a poison with the right element type.
LLVM_ABI PoisonValue * getElementValue(Constant *C) const
Return an poison of the right value for the specified GEP index if we can, otherwise return null (e....
StringRef - Represent a constant reference to a string, i.e.
Class to represent struct types.
Class to represent target extensions types, which are generally unintrospectable from target-independ...
The instances of the Type class are immutable: once they are created, they are never changed.
LLVM_ABI bool isScalableTy(SmallPtrSetImpl< const Type * > &Visited) const
Return true if this is a type whose size is a known multiple of vscale.
'undef' values are things that do not have specified contents.
UndefValue(const UndefValue &)=delete
static bool classof(const Value *V)
Methods for support type inquiry through isa, cast, and dyn_cast:
UndefValue(Type *T, ValueTy vty)
LLVM Value Representation.
Type * getType() const
All values are typed, get the type of this value.
void setValueSubclassData(unsigned short D)
ValueTy
Concrete subclass of this.
Base class of all SIMD vector types.
static LLVM_ABI VectorType * get(Type *ElementType, ElementCount EC)
This static method is the primary way to construct an VectorType.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
@ C
The default llvm calling convention, compatible with C.
This is an optimization pass for GlobalISel generic memory operations.
std::conjunction< std::is_base_of< T, Ts >... > are_base_of
traits class for checking whether type T is a base class for all the given types in the variadic list...
decltype(auto) get(const PointerIntPair< PointerTy, IntBits, IntType, PtrTraits, Info > &Pair)
static constexpr roundingMode rmNearestTiesToEven
This struct is a compact representation of a valid (non-zero power of two) alignment.
FixedNumOperandTraits - determine the allocation regime of the Use array when it is a prefix to the U...
This struct is a compact representation of a valid (power of two) or undefined (0) alignment.
Align valueOrOne() const
For convenience, returns a valid alignment or 1 if undefined.
Compile-time customization of User operands.
Information about how a User object was allocated, to be passed into the User constructor.
Indicates this User has operands co-allocated.
VariadicOperandTraits - determine the allocation regime of the Use array when it is a prefix to the U...