15#ifndef LLVM_IR_INSTRTYPES_H
16#define LLVM_IR_INSTRTYPES_H
63 :
Instruction(Ty, iType, AllocMarker, InsertBefore) {
69 void *
operator new(
size_t S) {
return User::operator
new(S, AllocMarker); }
70 void operator delete(
void *
Ptr) { User::operator
delete(
Ptr); }
77 return I->isUnaryOp() ||
I->getOpcode() == Instruction::Alloca ||
78 I->getOpcode() == Instruction::Load ||
79 I->getOpcode() == Instruction::VAArg ||
80 I->getOpcode() == Instruction::ExtractValue ||
81 I->getOpcode() == Instruction::Freeze ||
82 (
I->getOpcode() >= CastOpsBegin &&
I->getOpcode() < CastOpsEnd);
85 return isa<Instruction>(V) &&
classof(cast<Instruction>(V));
125#define HANDLE_UNARY_INST(N, OPC, CLASS) \
126 static UnaryOperator *Create##OPC(Value *V, const Twine &Name = "") { \
127 return Create(Instruction::OPC, V, Name); \
129#include "llvm/IR/Instruction.def"
130#define HANDLE_UNARY_INST(N, OPC, CLASS) \
131 static UnaryOperator *Create##OPC(Value *V, const Twine &Name, \
132 InsertPosition InsertBefore = nullptr) { \
133 return Create(Instruction::OPC, V, Name, InsertBefore); \
135#include "llvm/IR/Instruction.def"
137 static UnaryOperator *
149 return CreateWithCopiedFlags(Instruction::FNeg,
Op, FMFSource,
Name,
159 return I->isUnaryOp();
162 return isa<Instruction>(V) && classof(cast<Instruction>(V));
186 void *
operator new(
size_t S) {
return User::operator
new(S, AllocMarker); }
187 void operator delete(
void *
Ptr) { User::operator
delete(
Ptr); }
204#define HANDLE_BINARY_INST(N, OPC, CLASS) \
205 static BinaryOperator *Create##OPC(Value *V1, Value *V2, \
206 const Twine &Name = "") { \
207 return Create(Instruction::OPC, V1, V2, Name); \
209#include "llvm/IR/Instruction.def"
210#define HANDLE_BINARY_INST(N, OPC, CLASS) \
211 static BinaryOperator *Create##OPC(Value *V1, Value *V2, const Twine &Name, \
212 InsertPosition InsertBefore) { \
213 return Create(Instruction::OPC, V1, V2, Name, InsertBefore); \
215#include "llvm/IR/Instruction.def"
217 static BinaryOperator *
329#define DEFINE_HELPERS(OPC, NUWNSWEXACT) \
330 static BinaryOperator *Create##NUWNSWEXACT##OPC(Value *V1, Value *V2, \
331 const Twine &Name = "") { \
332 return Create##NUWNSWEXACT(Instruction::OPC, V1, V2, Name); \
334 static BinaryOperator *Create##NUWNSWEXACT##OPC( \
335 Value *V1, Value *V2, const Twine &Name, \
336 InsertPosition InsertBefore = nullptr) { \
337 return Create##NUWNSWEXACT(Instruction::OPC, V1, V2, Name, InsertBefore); \
364 InsertPosition InsertBefore =
nullptr);
366 InsertPosition InsertBefore =
nullptr);
368 InsertPosition InsertBefore =
nullptr);
383 return I->isBinaryOp();
386 return isa<Instruction>(V) &&
classof(cast<Instruction>(V));
402 enum { IsDisjoint = (1 << 0) };
405 SubclassOptionalData =
406 (SubclassOptionalData & ~IsDisjoint) | (
B * IsDisjoint);
409 bool isDisjoint()
const {
return SubclassOptionalData & IsDisjoint; }
412 return I->getOpcode() == Instruction::Or;
416 return isa<Instruction>(V) && classof(cast<Instruction>(V));
423 cast<PossiblyDisjointInst>(BO)->setIsDisjoint(
true);
430 cast<PossiblyDisjointInst>(BO)->setIsDisjoint(
true);
631 return isa<Instruction>(V) &&
classof(cast<Instruction>(V));
641 switch (
I->getOpcode()) {
642 case Instruction::ZExt:
643 case Instruction::UIToFP:
651 return isa<Instruction>(V) &&
classof(cast<Instruction>(V));
733 void *
operator new(
size_t S) {
return User::operator
new(S, AllocMarker); }
734 void operator delete(
void *
Ptr) { User::operator
delete(
Ptr); }
770 "FIRST_FCMP_PREDICATE is required to be 0");
980 return I->getOpcode() == Instruction::ICmp ||
981 I->getOpcode() == Instruction::FCmp;
984 return isa<Instruction>(V) &&
classof(cast<Instruction>(V));
989 if (
VectorType* vt = dyn_cast<VectorType>(opnd_type)) {
991 vt->getElementCount());
999 void setValueSubclassData(
unsigned short D) {
1026 if (
A == Attribute::ReadOnly ||
A == Attribute::NoCapture)
1027 return Inputs[
Idx]->getType()->isPointerTy();
1075 std::vector<InputTy> Inputs;
1081 : Tag(
std::
move(Tag)), Inputs(Inputs) {}
1128 Bitfield::areContiguous<CallInstReservedField, CallingConvField>(),
1129 "Bitfields must be contiguous");
1137 template <
class... ArgsTy>
1147 case Instruction::Call:
1149 case Instruction::Invoke:
1151 case Instruction::CallBr:
1193 return Bundle->Inputs[0].get();
1199 return I->getOpcode() == Instruction::Call ||
1200 I->getOpcode() == Instruction::Invoke ||
1201 I->getOpcode() == Instruction::CallBr;
1204 return isa<Instruction>(V) &&
classof(cast<Instruction>(V));
1247 assert(
this == U->getUser() &&
1248 "Only valid to query with a use of this instruction!");
1315 assert(
this == U->getUser() &&
1316 "Only valid to query with a use of this instruction!");
1408 return getSubclassData<CallingConvField>();
1412 setSubclassData<CallingConvField>(
CC);
1449 auto Intersected = AL.intersectWith(
getContext(), ALOther);
1460 assert(Kind != Attribute::NoBuiltin &&
1461 "Use CallBase::isNoBuiltin() to check for Attribute::NoBuiltin");
1462 return hasFnAttrImpl(Kind);
1582 return hasRetAttrImpl(Kind);
1595 return F->getRetAttribute(Kind);
1617 return getFnAttrOnCalledFunction(Kind);
1625 return getFnAttrOnCalledFunction(Kind);
1634 return getParamAttrOnCalledFunction(ArgNo, Kind);
1643 return getParamAttrOnCalledFunction(ArgNo, Kind);
1660 "Data operand index out of bounds!");
1670 "Must be either a call argument or an operand bundle!");
1741 return F->getAttributes().getRetAlignment();
1742 return std::nullopt;
1759 return F->getAttributes().getParamByRefType(ArgNo);
1768 return F->getAttributes().getParamByValType(ArgNo);
1777 return F->getAttributes().getParamPreallocatedType(ArgNo);
1786 return F->getAttributes().getParamInAllocaType(ArgNo);
1795 return F->getAttributes().getParamStructRetType(ArgNo);
1811 Bytes = std::max(Bytes,
F->getAttributes().getRetDereferenceableBytes());
1826 Bytes = std::max(Bytes,
1827 F->getAttributes().getRetDereferenceableOrNullBytes());
1849 std::optional<ConstantRange>
getRange()
const;
1874 return hasFnAttrImpl(Attribute::NoBuiltin) &&
1875 !hasFnAttrImpl(Attribute::Builtin);
1998 assert(
this == U->getUser() &&
1999 "Only valid to query with a use of this instruction!");
2056 if (U.getTagName() ==
Name)
2060 return std::nullopt;
2072 if (U.getTagID() ==
ID)
2076 return std::nullopt;
2109 return OBU.operandHasAttr(OpIdx - BOI.Begin,
A);
2120 Other.bundle_op_info_begin());
2223 auto *NonConstThis =
const_cast<CallBase *
>(
this);
2240 auto *NonConstThis =
const_cast<CallBase *
>(
this);
2261 const unsigned BeginIndex);
2282 for (
const auto &
B : Bundles)
2292 bool hasFnAttrOnCalledFunction(
StringRef Kind)
const;
2294 template <
typename AttrKind>
bool hasFnAttrImpl(AttrKind Kind)
const {
2298 return hasFnAttrOnCalledFunction(Kind);
2300 template <
typename AK> Attribute getFnAttrOnCalledFunction(AK Kind)
const;
2301 template <
typename AK>
2302 Attribute getParamAttrOnCalledFunction(
unsigned ArgNo, AK Kind)
const;
2306 template <
typename AttrKind>
bool hasRetAttrImpl(AttrKind Kind)
const {
2312 return F->getAttributes().hasRetAttr(Kind);
2349 unsigned arg_size()
const {
return getNumOperands() - 1; }
2360 Op<-1>() = ParentPad;
2379 return isa<Instruction>(V) && classof(cast<Instruction>(V));
OperandBundleDefT< Value * > OperandBundleDef
This file defines the StringMap class.
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
This file contains the simple types necessary to represent the attributes associated with functions a...
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
static GCRegistry::Add< StatepointGC > D("statepoint-example", "an example strategy for statepoint")
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
static bool isSigned(unsigned int Opcode)
#define DEFINE_HELPERS(OPC, NUWNSWEXACT)
#define DEFINE_TRANSPARENT_OPERAND_ACCESSORS(CLASS, VALUECLASS)
Macro for generating out-of-class operand accessor definitions.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
Provides some synthesis utilities to produce sequences of values.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Type * getParamStructRetType(unsigned ArgNo) const
Return the sret type for the specified function parameter.
AttributeList addDereferenceableParamAttr(LLVMContext &C, unsigned ArgNo, uint64_t Bytes) const
Add the dereferenceable attribute to the attribute set at the given arg index.
AttributeList removeAttributeAtIndex(LLVMContext &C, unsigned Index, Attribute::AttrKind Kind) const
Remove the specified attribute at the specified index from this attribute list.
AttributeList removeParamAttributes(LLVMContext &C, unsigned ArgNo, const AttributeMask &AttrsToRemove) const
Remove the specified attribute at the specified arg index from this attribute list.
AttributeList addRangeRetAttr(LLVMContext &C, const ConstantRange &CR) const
Add the range attribute to the attribute set at the return value index.
AttributeList addRetAttribute(LLVMContext &C, Attribute::AttrKind Kind) const
Add a return value attribute to the list.
AttributeList addDereferenceableRetAttr(LLVMContext &C, uint64_t Bytes) const
Add the dereferenceable attribute to the attribute set at the given index.
AttributeList removeRetAttributes(LLVMContext &C, const AttributeMask &AttrsToRemove) const
Remove the specified attribute at the return value index from this attribute list.
Attribute getParamAttr(unsigned ArgNo, Attribute::AttrKind Kind) const
Return the attribute object that exists at the arg index.
AttributeList addFnAttribute(LLVMContext &C, Attribute::AttrKind Kind) const
Add a function attribute to the list.
AttributeSet getRetAttrs() const
The attributes for the ret value are returned.
bool hasFnAttr(Attribute::AttrKind Kind) const
Return true if the attribute exists for the function.
uint64_t getParamDereferenceableBytes(unsigned Index) const
Get the number of dereferenceable bytes (or zero if unknown) of an arg.
MaybeAlign getParamAlignment(unsigned ArgNo) const
Return the alignment for the specified function parameter.
bool hasAttrSomewhere(Attribute::AttrKind Kind, unsigned *Index=nullptr) const
Return true if the specified attribute is set for at least one parameter or for the return value.
Type * getParamInAllocaType(unsigned ArgNo) const
Return the inalloca type for the specified function parameter.
Attribute getFnAttr(Attribute::AttrKind Kind) const
Return the attribute object that exists for the function.
MaybeAlign getRetAlignment() const
Return the alignment of the return value.
Type * getParamElementType(unsigned ArgNo) const
Return the elementtype type for the specified function parameter.
Attribute getAttributeAtIndex(unsigned Index, Attribute::AttrKind Kind) const
Return the attribute object that exists at the given index.
Type * getParamPreallocatedType(unsigned ArgNo) const
Return the preallocated type for the specified function parameter.
AttributeList removeParamAttribute(LLVMContext &C, unsigned ArgNo, Attribute::AttrKind Kind) const
Remove the specified attribute at the specified arg index from this attribute list.
Type * getParamByValType(unsigned ArgNo) const
Return the byval type for the specified function parameter.
Attribute getRetAttr(Attribute::AttrKind Kind) const
Return the attribute for the given attribute kind for the return value.
MaybeAlign getParamStackAlignment(unsigned ArgNo) const
Return the stack alignment for the specified function parameter.
uint64_t getRetDereferenceableBytes() const
Get the number of dereferenceable bytes (or zero if unknown) of the return value.
AttributeList removeFnAttribute(LLVMContext &C, Attribute::AttrKind Kind) const
Remove the specified attribute at the function index from this attribute list.
uint64_t getParamDereferenceableOrNullBytes(unsigned ArgNo) const
Get the number of dereferenceable_or_null bytes (or zero if unknown) of an arg.
AttributeList removeFnAttributes(LLVMContext &C, const AttributeMask &AttrsToRemove) const
Remove the specified attribute at the function index from this attribute list.
Type * getParamByRefType(unsigned ArgNo) const
Return the byref type for the specified function parameter.
AttributeList addAttributeAtIndex(LLVMContext &C, unsigned Index, Attribute::AttrKind Kind) const
Add an attribute to the attribute set at the given index.
AttributeSet getParamAttrs(unsigned ArgNo) const
The attributes for the argument or parameter at the given index are returned.
uint64_t getRetDereferenceableOrNullBytes() const
Get the number of dereferenceable_or_null bytes (or zero if unknown) of the return value.
AttributeList removeRetAttribute(LLVMContext &C, Attribute::AttrKind Kind) const
Remove the specified attribute at the return value index from this attribute list.
AttributeList addParamAttribute(LLVMContext &C, unsigned ArgNo, Attribute::AttrKind Kind) const
Add an argument attribute to the list.
bool hasRetAttr(Attribute::AttrKind Kind) const
Return true if the attribute exists for the return value.
AttrKind
This enumeration lists the attributes that can be associated with parameters, function results,...
bool isValid() const
Return true if the attribute is any kind of attribute.
static BinaryOperator * CreateFAddFMF(Value *V1, Value *V2, FastMathFlags FMF, const Twine &Name="")
static BinaryOperator * CreateNeg(Value *Op, const Twine &Name="", InsertPosition InsertBefore=nullptr)
Helper functions to construct and inspect unary operations (NEG and NOT) via binary operators SUB and...
static BinaryOperator * CreateFDivFMF(Value *V1, Value *V2, Instruction *FMFSource, const Twine &Name="")
BinaryOps getOpcode() const
static BinaryOperator * CreateNSW(BinaryOps Opc, Value *V1, Value *V2, const Twine &Name="")
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value)
Transparently provide more efficient getOperand methods.
static bool classof(const Value *V)
static BinaryOperator * CreateFRemFMF(Value *V1, Value *V2, Instruction *FMFSource, const Twine &Name="")
static BinaryOperator * CreateWithFMF(BinaryOps Opc, Value *V1, Value *V2, FastMathFlags FMF, const Twine &Name="", InsertPosition InsertBefore=nullptr)
static BinaryOperator * CreateExact(BinaryOps Opc, Value *V1, Value *V2, const Twine &Name="")
static BinaryOperator * CreateFMulFMF(Value *V1, Value *V2, Instruction *FMFSource, const Twine &Name="")
bool swapOperands()
Exchange the two operands to this instruction.
static BinaryOperator * CreateExact(BinaryOps Opc, Value *V1, Value *V2, const Twine &Name, InsertPosition InsertBefore)
static BinaryOperator * CreateNot(Value *Op, const Twine &Name="", InsertPosition InsertBefore=nullptr)
static BinaryOperator * CreateFSubFMF(Value *V1, Value *V2, Instruction *FMFSource, const Twine &Name="")
static BinaryOperator * Create(BinaryOps Op, Value *S1, Value *S2, const Twine &Name=Twine(), InsertPosition InsertBefore=nullptr)
Construct a binary instruction, given the opcode and the two operands.
static BinaryOperator * CreateNUW(BinaryOps Opc, Value *V1, Value *V2, const Twine &Name="")
static BinaryOperator * CreateFAddFMF(Value *V1, Value *V2, Instruction *FMFSource, const Twine &Name="")
static BinaryOperator * CreateFMulFMF(Value *V1, Value *V2, FastMathFlags FMF, const Twine &Name="")
static BinaryOperator * CreateFDivFMF(Value *V1, Value *V2, FastMathFlags FMF, const Twine &Name="")
static BinaryOperator * CreateNUW(BinaryOps Opc, Value *V1, Value *V2, const Twine &Name, InsertPosition InsertBefore)
static BinaryOperator * CreateFSubFMF(Value *V1, Value *V2, FastMathFlags FMF, const Twine &Name="")
static BinaryOperator * CreateDisjoint(BinaryOps Opc, Value *V1, Value *V2, const Twine &Name="")
static BinaryOperator * CreateWithCopiedFlags(BinaryOps Opc, Value *V1, Value *V2, Value *CopyO, const Twine &Name="", InsertPosition InsertBefore=nullptr)
static BinaryOperator * CreateNSWNeg(Value *Op, const Twine &Name="", InsertPosition InsertBefore=nullptr)
BinaryOperator * cloneImpl() const
static BinaryOperator * CreateNSW(BinaryOps Opc, Value *V1, Value *V2, const Twine &Name, InsertPosition InsertBefore)
static bool classof(const Instruction *I)
Base class for all callable instructions (InvokeInst and CallInst) Holds everything related to callin...
MaybeAlign getParamStackAlign(unsigned ArgNo) const
void setCalledFunction(FunctionType *FTy, Value *Fn)
Sets the function called, including updating to the specified function type.
FPClassTest getParamNoFPClass(unsigned i) const
Extract a test mask for disallowed floating-point value classes for the parameter.
bool isInlineAsm() const
Check if this call is an inline asm statement.
void addFnAttr(Attribute Attr)
Adds the attribute to the function.
bool hasDescriptor() const
BundleOpInfo & getBundleOpInfoForOperand(unsigned OpIdx)
Return the BundleOpInfo for the operand at index OpIdx.
Attribute getRetAttr(Attribute::AttrKind Kind) const
Return the attribute for the given attribute kind for the return value.
void setCallingConv(CallingConv::ID CC)
FPClassTest getRetNoFPClass() const
Extract a test mask for disallowed floating-point value classes for the return value.
bool cannotMerge() const
Determine if the call cannot be tail merged.
unsigned getBundleOperandsEndIndex() const
Return the index of the last bundle operand in the Use array.
bundle_op_iterator bundle_op_info_begin()
Return the start of the list of BundleOpInfo instances associated with this OperandBundleUser.
MemoryEffects getMemoryEffects() const
void addRangeRetAttr(const ConstantRange &CR)
adds the range attribute to the list of attributes.
void addFnAttr(Attribute::AttrKind Kind)
Adds the attribute to the function.
bool hasInAllocaArgument() const
Determine if there are is an inalloca argument.
void removeParamAttrs(unsigned ArgNo, const AttributeMask &AttrsToRemove)
Removes the attributes from the given argument.
bool hasByValArgument() const
Determine if any call argument is an aggregate passed by value.
bool doesNotAccessMemory() const
Determine if the call does not access memory.
MaybeAlign getRetAlign() const
Extract the alignment of the return value.
void getOperandBundlesAsDefs(SmallVectorImpl< OperandBundleDef > &Defs) const
Return the list of operand bundles attached to this instruction as a vector of OperandBundleDefs.
Type * getParamByRefType(unsigned ArgNo) const
Extract the byref type for a call or parameter.
void setOnlyAccessesArgMemory()
iterator_range< const_bundle_op_iterator > bundle_op_infos() const
Return the range [bundle_op_info_begin, bundle_op_info_end).
OperandBundleUse getOperandBundleAt(unsigned Index) const
Return the operand bundle at a specific index.
OperandBundleUse operandBundleFromBundleOpInfo(const BundleOpInfo &BOI) const
Simple helper function to map a BundleOpInfo to an OperandBundleUse.
bool isPassingUndefUB(unsigned ArgNo) const
Determine whether passing undef to this argument is undefined behavior.
bool hasArgument(const Value *V) const
Returns true if this CallSite passes the given Value* as an argument to the called function.
Type * getParamPreallocatedType(unsigned ArgNo) const
Extract the preallocated type for a call or parameter.
void setOnlyAccessesInaccessibleMemOrArgMem()
bool data_operands_empty() const
bool isNoBuiltin() const
Return true if the call should not be treated as a call to a builtin.
bool isOperandBundleOfType(uint32_t ID, unsigned Idx) const
Return true if the operand at index Idx is a bundle operand that has tag ID ID.
void addAttributeAtIndex(unsigned i, Attribute Attr)
adds the attribute to the list of attributes.
unsigned getDataOperandNo(const Use *U) const
Given a use for a data operand, get the data operand number that corresponds to it.
std::optional< OperandBundleUse > getOperandBundle(StringRef Name) const
Return an operand bundle by name, if present.
bool doesNotCapture(unsigned OpNo) const
Determine whether this data operand is not captured.
Type * getParamStructRetType(unsigned ArgNo) const
Extract the sret type for a call or parameter.
Attribute getParamAttr(unsigned ArgNo, StringRef Kind) const
Get the attribute of a given kind from a given arg.
void removeParamAttr(unsigned ArgNo, Attribute::AttrKind Kind)
Removes the attribute from the given argument.
Function * getCalledFunction() const
Returns the function called, or null if this is an indirect function invocation or the function signa...
Type * getParamInAllocaType(unsigned ArgNo) const
Extract the inalloca type for a call or parameter.
bool doesNotAccessMemory(unsigned OpNo) const
void removeRetAttrs(const AttributeMask &AttrsToRemove)
Removes the attributes from the return value.
void setDoesNotAccessMemory()
bool isInAllocaArgument(unsigned ArgNo) const
Determine whether this argument is passed in an alloca.
Use & getArgOperandUse(unsigned i)
bool hasFnAttr(Attribute::AttrKind Kind) const
Determine whether this call has the given attribute.
bool isStrictFP() const
Determine if the call requires strict floating point semantics.
User::op_iterator data_operands_begin()
data_operands_begin/data_operands_end - Return iterators iterating over the call / invoke argument li...
bool cannotDuplicate() const
Determine if the invoke cannot be duplicated.
AttributeSet getParamAttributes(unsigned ArgNo) const
Return the param attributes for this call.
bool hasRetAttr(Attribute::AttrKind Kind) const
Determine whether the return value has the given attribute.
User::const_op_iterator data_operands_end() const
bool onlyAccessesInaccessibleMemory() const
Determine if the function may only access memory that is inaccessible from the IR.
unsigned getNumOperandBundles() const
Return the number of operand bundles associated with this User.
uint64_t getParamDereferenceableBytes(unsigned i) const
Extract the number of dereferenceable bytes for a call or parameter (0=unknown).
void removeAttributeAtIndex(unsigned i, StringRef Kind)
removes the attribute from the list of attributes.
unsigned getDataOperandNo(Value::const_user_iterator UI) const
Given a value use iterator, return the data operand corresponding to it.
CallingConv::ID getCallingConv() const
bundle_op_iterator bundle_op_info_end()
Return the end of the list of BundleOpInfo instances associated with this OperandBundleUser.
unsigned getNumSubclassExtraOperandsDynamic() const
Get the number of extra operands for instructions that don't have a fixed number of extra operands.
void addParamAttr(unsigned ArgNo, Attribute Attr)
Adds the attribute to the indicated argument.
unsigned getNumSubclassExtraOperands() const
bool doesNoCfCheck() const
Determine if the call should not perform indirect branch tracking.
bool hasFnAttr(StringRef Kind) const
Determine whether this call has the given attribute.
bool paramHasAttr(unsigned ArgNo, Attribute::AttrKind Kind) const
Determine whether the argument or parameter has the given attribute.
bool hasIdenticalOperandBundleSchema(const CallBase &Other) const
Return true if Other has the same sequence of operand bundle tags with the same number of operands on...
User::const_op_iterator arg_begin() const
User::op_iterator arg_begin()
Return the iterator pointing to the beginning of the argument list.
bool isMustTailCall() const
Tests if this call site must be tail call optimized.
Attribute getParamAttr(unsigned ArgNo, Attribute::AttrKind Kind) const
Get the attribute of a given kind from a given arg.
bool hasRetAttr(StringRef Kind) const
Determine whether the return value has the given attribute.
static bool classof(const Instruction *I)
bool isDataOperand(Value::const_user_iterator UI) const
Use & getCalledOperandUse()
bool isIndirectCall() const
Return true if the callsite is an indirect call.
bool isNoInline() const
Return true if the call should not be inlined.
bool dataOperandHasImpliedAttr(unsigned i, Attribute::AttrKind Kind) const
Return true if the data operand at index i has the attribute A.
static constexpr int CalledOperandOpEndIdx
The last operand is the called operand.
bool onlyReadsMemory() const
Determine if the call does not access or only reads memory.
bool isBundleOperand(const Use *U) const
Returns true if the use is a bundle operand.
bool isByValArgument(unsigned ArgNo) const
Determine whether this argument is passed by value.
iterator_range< bundle_op_iterator > bundle_op_infos()
Return the range [bundle_op_info_begin, bundle_op_info_end).
bool onlyWritesMemory(unsigned OpNo) const
unsigned countOperandBundlesOfType(StringRef Name) const
Return the number of operand bundles with the tag Name attached to this instruction.
void setOnlyReadsMemory()
void removeFnAttrs(const AttributeMask &AttrsToRemove)
Removes the attributes from the function.
iterator_range< User::op_iterator > data_ops()
const_bundle_op_iterator bundle_op_info_begin() const
Return the start of the list of BundleOpInfo instances associated with this OperandBundleUser.
static CallBase * addOperandBundle(CallBase *CB, uint32_t ID, OperandBundleDef OB, InsertPosition InsertPt=nullptr)
Create a clone of CB with operand bundle OB added.
bool isCallee(Value::const_user_iterator UI) const
Determine whether the passed iterator points to the callee operand's Use.
iterator_range< User::const_op_iterator > args() const
MaybeAlign getParamAlign(unsigned ArgNo) const
Extract the alignment for a call or parameter (0=unknown).
unsigned getBundleOperandsStartIndex() const
Return the index of the first bundle operand in the Use array.
bool onlyAccessesInaccessibleMemOrArgMem() const
Determine if the function may only access memory that is either inaccessible from the IR or pointed t...
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value)
AttributeSet getRetAttributes() const
Return the return attributes for this call.
Attribute getFnAttr(Attribute::AttrKind Kind) const
Get the attribute of a given kind for the function.
User::op_iterator data_operands_end()
bool onlyReadsMemory(unsigned OpNo) const
Type * getParamByValType(unsigned ArgNo) const
Extract the byval type for a call or parameter.
bool isCallee(const Use *U) const
Determine whether this Use is the callee operand's Use.
CallBase(AttributeList const &A, FunctionType *FT, ArgsTy &&... Args)
const BundleOpInfo & getBundleOpInfoForOperand(unsigned OpIdx) const
Value * getCalledOperand() const
void setCalledFunction(FunctionCallee Fn)
Sets the function called, including updating the function type.
const Use & getCalledOperandUse() const
bool isArgOperand(Value::const_user_iterator UI) const
void setOnlyWritesMemory()
op_iterator populateBundleOperandInfos(ArrayRef< OperandBundleDef > Bundles, const unsigned BeginIndex)
Populate the BundleOpInfo instances and the Use& vector from Bundles.
void removeRetAttr(Attribute::AttrKind Kind)
Removes the attribute from the return value.
AttributeList Attrs
parameter attributes for callable
void addDereferenceableRetAttr(uint64_t Bytes)
adds the dereferenceable attribute to the list of attributes.
unsigned getArgOperandNo(Value::const_user_iterator UI) const
Given a value use iterator, return the arg operand number corresponding to it.
void setAttributes(AttributeList A)
Set the attributes for this call.
Attribute getFnAttr(StringRef Kind) const
Get the attribute of a given kind for the function.
void addAttributeAtIndex(unsigned i, Attribute::AttrKind Kind)
adds the attribute to the list of attributes.
unsigned countOperandBundlesOfType(uint32_t ID) const
Return the number of operand bundles with the tag ID attached to this instruction.
const Use & getArgOperandUse(unsigned i) const
Wrappers for getting the Use of a call argument.
bool hasOperandBundlesOtherThan(ArrayRef< uint32_t > IDs) const
Return true if this operand bundle user contains operand bundles with tags other than those specified...
bool returnDoesNotAlias() const
Determine if the return value is marked with NoAlias attribute.
OperandBundleUse getOperandBundleForOperand(unsigned OpIdx) const
Return the operand bundle for the operand at index OpIdx.
std::optional< ConstantRange > getRange() const
If this return value has a range attribute, return the value range of the argument.
bool doesNotThrow() const
Determine if the call cannot unwind.
void addRetAttr(Attribute::AttrKind Kind)
Adds the attribute to the return value.
Type * getParamElementType(unsigned ArgNo) const
Extract the elementtype type for a parameter.
bool isReturnNonNull() const
Return true if the return value is known to be not null.
Value * getArgOperand(unsigned i) const
bool hasStructRetAttr() const
Determine if the call returns a structure through first pointer argument.
uint64_t getRetDereferenceableBytes() const
Extract the number of dereferenceable bytes for a call or parameter (0=unknown).
void removeAttributeAtIndex(unsigned i, Attribute::AttrKind Kind)
removes the attribute from the list of attributes.
void setCannotDuplicate()
User::const_op_iterator data_operands_begin() const
void mutateFunctionType(FunctionType *FTy)
uint64_t getParamDereferenceableOrNullBytes(unsigned i) const
Extract the number of dereferenceable_or_null bytes for a parameter (0=unknown).
void setArgOperand(unsigned i, Value *v)
Attribute getAttributeAtIndex(unsigned i, Attribute::AttrKind Kind) const
Get the attribute of a given kind at a position.
bool bundleOperandHasAttr(unsigned OpIdx, Attribute::AttrKind A) const
Return true if the bundle operand at index OpIdx has the attribute A.
User::op_iterator arg_end()
Return the iterator pointing to the end of the argument list.
bool isBundleOperand(unsigned Idx) const
Return true if the operand at index Idx is a bundle operand.
bool isConvergent() const
Determine if the invoke is convergent.
FunctionType * getFunctionType() const
Intrinsic::ID getIntrinsicID() const
Returns the intrinsic ID of the intrinsic called or Intrinsic::not_intrinsic if the called function i...
static unsigned CountBundleInputs(ArrayRef< OperandBundleDef > Bundles)
Return the total number of values used in Bundles.
Value * getArgOperandWithAttribute(Attribute::AttrKind Kind) const
If one of the arguments has the specified attribute, returns its operand value.
Value * getReturnedArgOperand() const
If one of the arguments has the 'returned' attribute, returns its operand value.
void setOnlyAccessesInaccessibleMemory()
static CallBase * Create(CallBase *CB, ArrayRef< OperandBundleDef > Bundles, InsertPosition InsertPt=nullptr)
Create a clone of CB with a different set of operand bundles and insert it before InsertPt.
bool onlyWritesMemory() const
Determine if the call does not access or only writes memory.
unsigned data_operands_size() const
void removeFnAttr(Attribute::AttrKind Kind)
Removes the attribute from the function.
uint64_t getRetDereferenceableOrNullBytes() const
Extract the number of dereferenceable_or_null bytes for a call (0=unknown).
iterator_range< User::op_iterator > args()
Iteration adapter for range-for loops.
unsigned getArgOperandNo(const Use *U) const
Given a use for a arg operand, get the arg operand number that corresponds to it.
bool isBundleOperand(Value::const_user_iterator UI) const
bool hasClobberingOperandBundles() const
Return true if this operand bundle user has operand bundles that may write to the heap.
static bool classof(const Value *V)
Value * getConvergenceControlToken() const
Return the convergence control token for this call, if it exists.
void setCalledOperand(Value *V)
static CallBase * removeOperandBundle(CallBase *CB, uint32_t ID, InsertPosition InsertPt=nullptr)
Create a clone of CB with operand bundle ID removed.
bool doesNotReturn() const
Determine if the call cannot return.
bool hasReadingOperandBundles() const
Return true if this operand bundle user has operand bundles that may read from the heap.
void removeFnAttr(StringRef Kind)
Removes the attribute from the function.
bool onlyAccessesArgMemory() const
Determine if the call can access memmory only using pointers based on its arguments.
unsigned arg_size() const
void addDereferenceableParamAttr(unsigned i, uint64_t Bytes)
adds the dereferenceable attribute to the list of attributes.
AttributeList getAttributes() const
Return the attributes for this call.
std::optional< OperandBundleUse > getOperandBundle(uint32_t ID) const
Return an operand bundle by tag ID, if present.
void addRetAttr(Attribute Attr)
Adds the attribute to the return value.
void addParamAttr(unsigned ArgNo, Attribute::AttrKind Kind)
Adds the attribute to the indicated argument.
iterator_range< User::const_op_iterator > data_ops() const
bool isArgOperand(const Use *U) const
bool isDataOperand(const Use *U) const
bool hasDeoptState() const
Return true if the call has deopt state bundle.
void setMemoryEffects(MemoryEffects ME)
bool hasOperandBundles() const
Return true if this User has any operand bundles.
void setCalledFunction(Function *Fn)
Sets the function called, including updating the function type.
const_bundle_op_iterator bundle_op_info_end() const
Return the end of the list of BundleOpInfo instances associated with this OperandBundleUser.
bool isPassPointeeByValueArgument(unsigned ArgNo) const
Determine whether this argument is passed by value, in an alloca, or is preallocated.
bool isTailCall() const
Tests if this call site is marked as a tail call.
const Function * getCaller() const
void removeParamAttr(unsigned ArgNo, StringRef Kind)
Removes the attribute from the given argument.
User::const_op_iterator arg_end() const
Function * getCaller()
Helper to get the caller (the parent function).
bool tryIntersectAttributes(const CallBase *Other)
Try to intersect the attributes from 'this' CallBase and the 'Other' CallBase.
unsigned getNumTotalBundleOperands() const
Return the total number operands (not operand bundles) used by every operand bundle in this OperandBu...
Attribute getAttributeAtIndex(unsigned i, StringRef Kind) const
Get the attribute of a given kind at a position.
This is the base class for all instructions that perform data casts.
Type * getSrcTy() const
Return the source type, as a convenience.
static Instruction::CastOps getCastOpcode(const Value *Val, bool SrcIsSigned, Type *Ty, bool DstIsSigned)
Returns the opcode necessary to cast Val into Ty using usual casting rules.
static CastInst * CreatePointerBitCastOrAddrSpaceCast(Value *S, Type *Ty, const Twine &Name="", InsertPosition InsertBefore=nullptr)
Create a BitCast or an AddrSpaceCast cast instruction.
Instruction::CastOps getOpcode() const
Return the opcode of this CastInst.
static bool classof(const Value *V)
static CastInst * CreateIntegerCast(Value *S, Type *Ty, bool isSigned, const Twine &Name="", InsertPosition InsertBefore=nullptr)
Create a ZExt, BitCast, or Trunc for int -> int casts.
static CastInst * CreateFPCast(Value *S, Type *Ty, const Twine &Name="", InsertPosition InsertBefore=nullptr)
Create an FPExt, BitCast, or FPTrunc for fp -> fp casts.
static unsigned isEliminableCastPair(Instruction::CastOps firstOpcode, Instruction::CastOps secondOpcode, Type *SrcTy, Type *MidTy, Type *DstTy, Type *SrcIntPtrTy, Type *MidIntPtrTy, Type *DstIntPtrTy)
Determine how a pair of casts can be eliminated, if they can be at all.
CastInst(Type *Ty, unsigned iType, Value *S, const Twine &NameStr="", InsertPosition InsertBefore=nullptr)
Constructor with insert-before-instruction semantics for subclasses.
static bool isBitOrNoopPointerCastable(Type *SrcTy, Type *DestTy, const DataLayout &DL)
Check whether a bitcast, inttoptr, or ptrtoint cast between these types is valid and a no-op.
static bool castIsValid(Instruction::CastOps op, Value *S, Type *DstTy)
static bool isBitCastable(Type *SrcTy, Type *DestTy)
Check whether a bitcast between these types is valid.
static CastInst * CreateTruncOrBitCast(Value *S, Type *Ty, const Twine &Name="", InsertPosition InsertBefore=nullptr)
Create a Trunc or BitCast cast instruction.
static CastInst * CreatePointerCast(Value *S, Type *Ty, const Twine &Name="", InsertPosition InsertBefore=nullptr)
Create a BitCast, AddrSpaceCast or a PtrToInt cast instruction.
static CastInst * CreateBitOrPointerCast(Value *S, Type *Ty, const Twine &Name="", InsertPosition InsertBefore=nullptr)
Create a BitCast, a PtrToInt, or an IntToPTr cast instruction.
static bool isNoopCast(Instruction::CastOps Opcode, Type *SrcTy, Type *DstTy, const DataLayout &DL)
A no-op cast is one that can be effected without changing any bits.
static CastInst * CreateZExtOrBitCast(Value *S, Type *Ty, const Twine &Name="", InsertPosition InsertBefore=nullptr)
Create a ZExt or BitCast cast instruction.
static CastInst * Create(Instruction::CastOps, Value *S, Type *Ty, const Twine &Name="", InsertPosition InsertBefore=nullptr)
Provides a way to construct any of the CastInst subclasses using an opcode instead of the subclass's ...
bool isIntegerCast() const
There are several places where we need to know if a cast instruction only deals with integer source a...
Type * getDestTy() const
Return the destination type, as a convenience.
static CastInst * CreateSExtOrBitCast(Value *S, Type *Ty, const Twine &Name="", InsertPosition InsertBefore=nullptr)
Create a SExt or BitCast cast instruction.
static bool castIsValid(Instruction::CastOps op, Type *SrcTy, Type *DstTy)
This method can be used to determine if a cast from SrcTy to DstTy using Opcode op is valid or not.
static bool classof(const Instruction *I)
Methods for support type inquiry through isa, cast, and dyn_cast:
This class is the base class for the comparison instructions.
static Type * makeCmpResultType(Type *opnd_type)
Create a result type for fcmp/icmp.
Predicate getStrictPredicate() const
For example, SGE -> SGT, SLE -> SLT, ULE -> ULT, UGE -> UGT.
bool isEquality() const
Determine if this is an equals/not equals predicate.
void setPredicate(Predicate P)
Set the predicate for this instruction to the specified value.
bool isFalseWhenEqual() const
This is just a convenience.
static bool classof(const Instruction *I)
Methods for support type inquiry through isa, cast, and dyn_cast:
Predicate
This enumeration lists the possible predicates for CmpInst subclasses.
@ FCMP_OEQ
0 0 0 1 True if ordered and equal
@ FCMP_TRUE
1 1 1 1 Always true (always folded)
@ ICMP_SLT
signed less than
@ ICMP_SLE
signed less or equal
@ FCMP_OLT
0 1 0 0 True if ordered and less than
@ FCMP_ULE
1 1 0 1 True if unordered, less than, or equal
@ FCMP_OGT
0 0 1 0 True if ordered and greater than
@ FCMP_OGE
0 0 1 1 True if ordered and greater than or equal
@ ICMP_UGE
unsigned greater or equal
@ ICMP_UGT
unsigned greater than
@ ICMP_SGT
signed greater than
@ FCMP_ULT
1 1 0 0 True if unordered or less than
@ FCMP_ONE
0 1 1 0 True if ordered and operands are unequal
@ FCMP_UEQ
1 0 0 1 True if unordered or equal
@ ICMP_ULT
unsigned less than
@ FCMP_UGT
1 0 1 0 True if unordered or greater than
@ FCMP_OLE
0 1 0 1 True if ordered and less than or equal
@ FCMP_ORD
0 1 1 1 True if ordered (no nans)
@ ICMP_SGE
signed greater or equal
@ FCMP_UNE
1 1 1 0 True if unordered or not equal
@ ICMP_ULE
unsigned less or equal
@ FCMP_UGE
1 0 1 1 True if unordered, greater than, or equal
@ FCMP_FALSE
0 0 0 0 Always false (always folded)
@ FCMP_UNO
1 0 0 0 True if unordered: isnan(X) | isnan(Y)
static auto ICmpPredicates()
Returns the sequence of all ICmp predicates.
bool isEquivalence(bool Invert=false) const
Determine if one operand of this compare can always be replaced by the other operand,...
Predicate getSwappedPredicate() const
For example, EQ->EQ, SLE->SGE, ULT->UGT, OEQ->OEQ, ULE->UGE, OLT->OGT, etc.
static auto FCmpPredicates()
Returns the sequence of all FCmp predicates.
bool isTrueWhenEqual() const
This is just a convenience.
static CmpInst * Create(OtherOps Op, Predicate Pred, Value *S1, Value *S2, const Twine &Name="", InsertPosition InsertBefore=nullptr)
Construct a compare instruction, given the opcode, the predicate and the two operands.
Predicate getOrderedPredicate() const
static bool isFPPredicate(Predicate P)
Predicate getNonStrictPredicate() const
For example, SGT -> SGE, SLT -> SLE, ULT -> ULE, UGT -> UGE.
static CmpInst * CreateWithCopiedFlags(OtherOps Op, Predicate Pred, Value *S1, Value *S2, const Instruction *FlagsSource, const Twine &Name="", InsertPosition InsertBefore=nullptr)
Construct a compare instruction, given the opcode, the predicate, the two operands and the instructio...
bool isNonStrictPredicate() const
bool isFPPredicate() const
void swapOperands()
This is just a convenience that dispatches to the subclasses.
static bool isRelational(Predicate P)
Return true if the predicate is relational (not EQ or NE).
Predicate getInversePredicate() const
For example, EQ -> NE, UGT -> ULE, SLT -> SGE, OEQ -> UNE, UGT -> OLE, OLT -> UGE,...
static StringRef getPredicateName(Predicate P)
Predicate getPredicate() const
Return the predicate for this instruction.
bool isStrictPredicate() const
static bool isUnordered(Predicate predicate)
Determine if the predicate is an unordered operation.
Predicate getFlippedStrictnessPredicate() const
For predicate of kind "is X or equal to 0" returns the predicate "is X".
static bool isImpliedTrueByMatchingCmp(Predicate Pred1, Predicate Pred2)
Determine if Pred1 implies Pred2 is true when two compares have matching operands.
static Predicate getOrderedPredicate(Predicate Pred)
Returns the ordered variant of a floating point compare.
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value)
Provide more efficient getOperand methods.
bool isIntPredicate() const
static bool isIntPredicate(Predicate P)
Predicate getUnorderedPredicate() const
static bool isOrdered(Predicate predicate)
Determine if the predicate is an ordered operation.
static bool classof(const Value *V)
static bool isImpliedFalseByMatchingCmp(Predicate Pred1, Predicate Pred2)
Determine if Pred1 implies Pred2 is false when two compares have matching operands.
static Predicate getUnorderedPredicate(Predicate Pred)
Returns the unordered variant of a floating point compare.
OtherOps getOpcode() const
Get the opcode casted to the right type.
bool isCommutative() const
This is just a convenience that dispatches to the subclasses.
bool isRelational() const
Return true if the predicate is relational (not EQ or NE).
This class represents a range of values.
This class represents an Operation in the Expression.
A parsed version of the target data layout string in and methods for querying it.
Convenience struct for specifying and reasoning about fast-math flags.
static bool classof(const Instruction *I)
op_range arg_operands()
arg_operands - iteration adapter for range-for loops.
void setArgOperand(unsigned i, Value *v)
unsigned arg_size() const
arg_size - Return the number of funcletpad arguments.
static bool classof(const Value *V)
void setParentPad(Value *ParentPad)
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value)
Provide fast operand accessors.
Value * getParentPad() const
Convenience accessors.
const_op_range arg_operands() const
arg_operands - iteration adapter for range-for loops.
Value * getArgOperand(unsigned i) const
getArgOperand/setArgOperand - Return/set the i-th funcletpad argument.
A handy container for a FunctionType+Callee-pointer pair, which can be passed around as a single enti...
FunctionType * getFunctionType()
Class to represent function types.
Type * getReturnType() const
FunctionType * getFunctionType() const
Returns the FunctionType for me.
void setHasNoUnsignedWrap(bool b=true)
Set or clear the nuw flag on this instruction, which must be an operator which supports this flag.
void copyIRFlags(const Value *V, bool IncludeWrapFlags=true)
Convenience method to copy supported exact, fast-math, and (optionally) wrapping flags from V to this...
void setHasNoSignedWrap(bool b=true)
Set or clear the nsw flag on this instruction, which must be an operator which supports this flag.
void setFastMathFlags(FastMathFlags FMF)
Convenience function for setting multiple fast-math flags on this instruction, which must be an opera...
unsigned getOpcode() const
Returns a member of one of the enums like Instruction::Add.
void setIsExact(bool b=true)
Set or clear the exact flag on this instruction, which must be an operator which supports this flag.
Instruction(const Instruction &)=delete
A container for an operand bundle being viewed as a set of values rather than a set of uses.
size_t input_size() const
input_iterator input_end() const
OperandBundleDefT(const OperandBundleUse &OBU)
ArrayRef< InputTy > inputs() const
typename std::vector< InputTy >::const_iterator input_iterator
OperandBundleDefT(std::string Tag, std::vector< InputTy > Inputs)
input_iterator input_begin() const
OperandBundleDefT(std::string Tag, ArrayRef< InputTy > Inputs)
An or instruction, which can be marked as "disjoint", indicating that the inputs don't have a 1 in th...
void setIsDisjoint(bool B)
static bool classof(const Value *V)
static bool classof(const Instruction *I)
Instruction that can have a nneg flag (zext/uitofp).
static bool classof(const Instruction *I)
static bool classof(const Value *V)
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
const ValueTy & getValue() const
StringMapEntry - This is used to represent one value that is inserted into a StringMap.
StringRef - Represent a constant reference to a string, i.e.
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
The instances of the Type class are immutable: once they are created, they are never changed.
static IntegerType * getInt1Ty(LLVMContext &C)
LLVMContext & getContext() const
Return the LLVMContext in which this type was uniqued.
static bool classof(const Instruction *I)
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value)
Transparently provide more efficient getOperand methods.
static bool classof(const Value *V)
UnaryInstruction(Type *Ty, unsigned iType, Value *V, InsertPosition InsertBefore=nullptr)
static UnaryOperator * CreateWithCopiedFlags(UnaryOps Opc, Value *V, Instruction *CopyO, const Twine &Name="", InsertPosition InsertBefore=nullptr)
UnaryOps getOpcode() const
static UnaryOperator * CreateFNegFMF(Value *Op, Instruction *FMFSource, const Twine &Name="", InsertPosition InsertBefore=nullptr)
static bool classof(const Value *V)
static bool classof(const Instruction *I)
A Use represents the edge between a Value definition and its users.
ArrayRef< const uint8_t > getDescriptor() const
Returns the descriptor co-allocated with this User instance.
const Use & getOperandUse(unsigned i) const
void setOperand(unsigned i, Value *Val)
Value * getOperand(unsigned i) const
LLVM Value Representation.
Type * getType() const
All values are typed, get the type of this value.
user_iterator_impl< const User > const_user_iterator
void setName(const Twine &Name)
Change the name of the value.
void setValueSubclassData(unsigned short D)
LLVMContext & getContext() const
All values hold a context through their type.
void mutateType(Type *Ty)
Mutate the type of this Value to be of the specified type.
Base class of all SIMD vector types.
static VectorType * get(Type *ElementType, ElementCount EC)
This static method is the primary way to construct an VectorType.
A range adaptor for a pair of iterators.
This class implements an extremely fast bulk output stream that can only output to a stream.
This provides a very simple, boring adaptor for a begin and end iterator into a range type.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
@ MaxID
The highest possible ID. Must be some 2^k - 1.
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
This is an optimization pass for GlobalISel generic memory operations.
auto enum_seq_inclusive(EnumT Begin, EnumT End)
Iterate over an enum type from Begin to End inclusive.
iterator_range< T > make_range(T x, T y)
Convenience function for iterating over sub-ranges.
void append_range(Container &C, Range &&R)
Wrapper function to append range R to container C.
constexpr force_iteration_on_noniterable_enum_t force_iteration_on_noniterable_enum
FPClassTest
Floating-point class tests, supported by 'is_fpclass' intrinsic.
@ Or
Bitwise or logical OR of integers.
@ Mul
Product of integers.
DWARFExpression::Operation Op
raw_ostream & operator<<(raw_ostream &OS, const APFixedPoint &FX)
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
bool is_contained(R &&Range, const E &Element)
Returns true if Element is found in Range.
Implement std::hash so that hash_code can be used in STL containers.
This struct is a compact representation of a valid (non-zero power of two) alignment.
Describes an element of a Bitfield.
static constexpr unsigned NextBit
Used to keep track of an operand bundle.
bool operator==(const BundleOpInfo &Other) const
StringMapEntry< uint32_t > * Tag
The operand bundle tag, interned by LLVMContextImpl::getOrInsertBundleTag.
uint32_t End
The index in the Use& vector where operands for this operand bundle ends.
uint32_t Begin
The index in the Use& vector where operands for this operand bundle starts.
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.
A lightweight accessor for an operand bundle meant to be passed around by value.
bool isFuncletOperandBundle() const
Return true if this is a "funclet" operand bundle.
StringRef getTagName() const
Return the tag of this operand bundle as a string.
bool isDeoptOperandBundle() const
Return true if this is a "deopt" operand bundle.
OperandBundleUse()=default
OperandBundleUse(StringMapEntry< uint32_t > *Tag, ArrayRef< Use > Inputs)
uint32_t getTagID() const
Return the tag of this operand bundle as an integer.
bool operandHasAttr(unsigned Idx, Attribute::AttrKind A) const
Return true if the operand at index Idx in this operand bundle has the attribute A.
bool isCFGuardTargetOperandBundle() const
Return true if this is a "cfguardtarget" operand bundle.
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...