Base class for all callable instructions (InvokeInst andCallInst) Holds everything related to calling a function.More...
#include "llvm/IR/InstrTypes.h"
Classes | |
struct | BundleOpInfo |
Used to keep track of an operand bundle.More... | |
Public Member Functions | |
Value * | getConvergenceControlToken ()const |
Return the convergence control token for this call, if it exists. | |
FunctionType * | getFunctionType ()const |
void | mutateFunctionType (FunctionType *FTy) |
DECLARE_TRANSPARENT_OPERAND_ACCESSORS (Value) | |
User::op_iterator | data_operands_begin () |
data_operands_begin/data_operands_end - Return iterators iterating over the call / invoke argument list and bundle operands. | |
User::const_op_iterator | data_operands_begin ()const |
User::op_iterator | data_operands_end () |
User::const_op_iterator | data_operands_end ()const |
iterator_range<User::op_iterator > | data_ops () |
iterator_range<User::const_op_iterator > | data_ops ()const |
bool | data_operands_empty ()const |
unsigned | data_operands_size ()const |
bool | isDataOperand (constUse *U)const |
bool | isDataOperand (Value::const_user_iterator UI)const |
unsigned | getDataOperandNo (Value::const_user_iterator UI)const |
Given a value use iterator, return the data operand corresponding to it. | |
unsigned | getDataOperandNo (constUse *U)const |
Given a use for a data operand, get the data operand number that corresponds to it. | |
User::op_iterator | arg_begin () |
Return the iterator pointing to the beginning of the argument list. | |
User::const_op_iterator | arg_begin ()const |
User::op_iterator | arg_end () |
Return the iterator pointing to the end of the argument list. | |
User::const_op_iterator | arg_end ()const |
iterator_range<User::op_iterator > | args () |
Iteration adapter for range-for loops. | |
iterator_range<User::const_op_iterator > | args ()const |
bool | arg_empty ()const |
unsigned | arg_size ()const |
Value * | getArgOperand (unsigned i)const |
void | setArgOperand (unsigned i,Value *v) |
constUse & | getArgOperandUse (unsigned i)const |
Wrappers for getting theUse of a call argument. | |
Use & | getArgOperandUse (unsigned i) |
bool | isArgOperand (constUse *U)const |
bool | isArgOperand (Value::const_user_iterator UI)const |
unsigned | getArgOperandNo (constUse *U)const |
Given a use for a arg operand, get the arg operand number that corresponds to it. | |
unsigned | getArgOperandNo (Value::const_user_iterator UI)const |
Given a value use iterator, return the arg operand number corresponding to it. | |
bool | hasArgument (constValue *V)const |
Returns true if this CallSite passes the given Value* as an argument to the called function. | |
Value * | getCalledOperand ()const |
constUse & | getCalledOperandUse ()const |
Use & | getCalledOperandUse () |
Function * | getCalledFunction ()const |
Returns the function called, or null if this is an indirect function invocation or the function signature does not match the call signature. | |
bool | isIndirectCall ()const |
Return true if the callsite is an indirect call. | |
bool | isCallee (Value::const_user_iterator UI)const |
Determine whether the passed iterator points to the callee operand'sUse. | |
bool | isCallee (constUse *U)const |
Determine whether thisUse is the callee operand'sUse. | |
Function * | getCaller () |
Helper to get the caller (the parent function). | |
constFunction * | getCaller ()const |
bool | isMustTailCall ()const |
Tests if this call site must be tail call optimized. | |
bool | isTailCall ()const |
Tests if this call site is marked as a tail call. | |
Intrinsic::ID | getIntrinsicID ()const |
Returns the intrinsic ID of the intrinsic called orIntrinsic::not_intrinsic if the called function is not an intrinsic, or if this is an indirect call. | |
void | setCalledOperand (Value *V) |
void | setCalledFunction (Function *Fn) |
Sets the function called, including updating the function type. | |
void | setCalledFunction (FunctionCallee Fn) |
Sets the function called, including updating the function type. | |
void | setCalledFunction (FunctionType *FTy,Value *Fn) |
Sets the function called, including updating to the specified function type. | |
CallingConv::ID | getCallingConv ()const |
void | setCallingConv (CallingConv::IDCC) |
bool | isInlineAsm ()const |
Check if this call is an inline asm statement. | |
Attribute API | |
These methods access and modify attributes on this call (including looking through to the attributes on the called function when necessary). | |
AttributeList | getAttributes ()const |
Return the attributes for this call. | |
void | setAttributes (AttributeListA) |
Set the attributes for this call. | |
AttributeSet | getRetAttributes ()const |
Return the return attributes for this call. | |
AttributeSet | getParamAttributes (unsigned ArgNo)const |
Return the param attributes for this call. | |
bool | tryIntersectAttributes (constCallBase *Other) |
Try to intersect the attributes from 'this'CallBase and the 'Other'CallBase. | |
bool | hasFnAttr (Attribute::AttrKind Kind)const |
Determine whether this call has the given attribute. | |
bool | hasFnAttr (StringRef Kind)const |
Determine whether this call has the given attribute. | |
void | addAttributeAtIndex (unsigned i,Attribute::AttrKind Kind) |
adds the attribute to the list of attributes. | |
void | addAttributeAtIndex (unsigned i,Attribute Attr) |
adds the attribute to the list of attributes. | |
void | addFnAttr (Attribute::AttrKind Kind) |
Adds the attribute to the function. | |
void | addFnAttr (Attribute Attr) |
Adds the attribute to the function. | |
void | addRetAttr (Attribute::AttrKind Kind) |
Adds the attribute to the return value. | |
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. | |
void | addParamAttr (unsigned ArgNo,Attribute Attr) |
Adds the attribute to the indicated argument. | |
void | removeAttributeAtIndex (unsigned i,Attribute::AttrKind Kind) |
removes the attribute from the list of attributes. | |
void | removeAttributeAtIndex (unsigned i,StringRef Kind) |
removes the attribute from the list of attributes. | |
void | removeFnAttrs (constAttributeMask &AttrsToRemove) |
Removes the attributes from the function. | |
void | removeFnAttr (Attribute::AttrKind Kind) |
Removes the attribute from the function. | |
void | removeFnAttr (StringRef Kind) |
Removes the attribute from the function. | |
void | removeRetAttr (Attribute::AttrKind Kind) |
Removes the attribute from the return value. | |
void | removeRetAttrs (constAttributeMask &AttrsToRemove) |
Removes the attributes from the return value. | |
void | removeParamAttr (unsigned ArgNo,Attribute::AttrKind Kind) |
Removes the attribute from the given argument. | |
void | removeParamAttr (unsigned ArgNo,StringRef Kind) |
Removes the attribute from the given argument. | |
void | removeParamAttrs (unsigned ArgNo,constAttributeMask &AttrsToRemove) |
Removes the attributes from the given argument. | |
void | addDereferenceableParamAttr (unsigned i,uint64_t Bytes) |
adds the dereferenceable attribute to the list of attributes. | |
void | addDereferenceableRetAttr (uint64_t Bytes) |
adds the dereferenceable attribute to the list of attributes. | |
void | addRangeRetAttr (constConstantRange &CR) |
adds the range attribute to the list of attributes. | |
bool | hasRetAttr (Attribute::AttrKind Kind)const |
Determine whether the return value has the given attribute. | |
bool | hasRetAttr (StringRef Kind)const |
Determine whether the return value has the given attribute. | |
Attribute | getRetAttr (Attribute::AttrKind Kind)const |
Return the attribute for the given attribute kind for the return value. | |
bool | paramHasAttr (unsigned ArgNo,Attribute::AttrKind Kind)const |
Determine whether the argument or parameter has the given attribute. | |
Attribute | getAttributeAtIndex (unsigned i,Attribute::AttrKind Kind)const |
Get the attribute of a given kind at a position. | |
Attribute | getAttributeAtIndex (unsigned i,StringRef Kind)const |
Get the attribute of a given kind at a position. | |
Attribute | getFnAttr (StringRef Kind)const |
Get the attribute of a given kind for the function. | |
Attribute | getFnAttr (Attribute::AttrKind Kind)const |
Get the attribute of a given kind for the function. | |
Attribute | getParamAttr (unsigned ArgNo,Attribute::AttrKind Kind)const |
Get the attribute of a given kind from a given arg. | |
Attribute | getParamAttr (unsigned ArgNo,StringRef Kind)const |
Get the attribute of a given kind from a given arg. | |
bool | dataOperandHasImpliedAttr (unsigned i,Attribute::AttrKind Kind)const |
Return true if the data operand at indexi has the attributeA . | |
bool | doesNotCapture (unsigned OpNo)const |
Determine whether this data operand is not captured. | |
bool | isByValArgument (unsigned ArgNo)const |
Determine whether this argument is passed by value. | |
bool | isInAllocaArgument (unsigned ArgNo)const |
Determine whether this argument is passed in an alloca. | |
bool | isPassPointeeByValueArgument (unsigned ArgNo)const |
Determine whether this argument is passed by value, in an alloca, or is preallocated. | |
bool | isPassingUndefUB (unsigned ArgNo)const |
Determine whether passing undef to this argument is undefined behavior. | |
bool | hasInAllocaArgument ()const |
Determine if there are is an inalloca argument. | |
bool | doesNotAccessMemory (unsigned OpNo)const |
bool | onlyReadsMemory (unsigned OpNo)const |
bool | onlyWritesMemory (unsigned OpNo)const |
MaybeAlign | getRetAlign ()const |
Extract the alignment of the return value. | |
MaybeAlign | getParamAlign (unsigned ArgNo)const |
Extract the alignment for a call or parameter (0=unknown). | |
MaybeAlign | getParamStackAlign (unsigned ArgNo)const |
Type * | getParamByRefType (unsigned ArgNo)const |
Extract the byref type for a call or parameter. | |
Type * | getParamByValType (unsigned ArgNo)const |
Extract the byval type for a call or parameter. | |
Type * | getParamPreallocatedType (unsigned ArgNo)const |
Extract the preallocated type for a call or parameter. | |
Type * | getParamInAllocaType (unsigned ArgNo)const |
Extract the inalloca type for a call or parameter. | |
Type * | getParamStructRetType (unsigned ArgNo)const |
Extract the sret type for a call or parameter. | |
Type * | getParamElementType (unsigned ArgNo)const |
Extract the elementtype type for a parameter. | |
uint64_t | getRetDereferenceableBytes ()const |
Extract the number of dereferenceable bytes for a call or parameter (0=unknown). | |
uint64_t | getParamDereferenceableBytes (unsigned i)const |
Extract the number of dereferenceable bytes for a call or parameter (0=unknown). | |
uint64_t | getRetDereferenceableOrNullBytes ()const |
Extract the number of dereferenceable_or_null bytes for a call (0=unknown). | |
uint64_t | getParamDereferenceableOrNullBytes (unsigned i)const |
Extract the number of dereferenceable_or_null bytes for a parameter (0=unknown). | |
FPClassTest | getRetNoFPClass ()const |
Extract a test mask for disallowed floating-point value classes for the return value. | |
FPClassTest | getParamNoFPClass (unsigned i)const |
Extract a test mask for disallowed floating-point value classes for the parameter. | |
std::optional<ConstantRange > | getRange ()const |
If this return value has a range attribute, return the value range of the argument. | |
bool | isReturnNonNull ()const |
Return true if the return value is known to be not null. | |
bool | returnDoesNotAlias ()const |
Determine if the return value is marked with NoAlias attribute. | |
Value * | getReturnedArgOperand ()const |
If one of the arguments has the 'returned' attribute, returns its operand value. | |
Value * | getArgOperandWithAttribute (Attribute::AttrKind Kind)const |
If one of the arguments has the specified attribute, returns its operand value. | |
bool | isNoBuiltin ()const |
Return true if the call should not be treated as a call to a builtin. | |
bool | isStrictFP ()const |
Determine if the call requires strict floating point semantics. | |
bool | isNoInline ()const |
Return true if the call should not be inlined. | |
void | setIsNoInline () |
MemoryEffects | getMemoryEffects ()const |
void | setMemoryEffects (MemoryEffects ME) |
bool | doesNotAccessMemory ()const |
Determine if the call does not access memory. | |
void | setDoesNotAccessMemory () |
bool | onlyReadsMemory ()const |
Determine if the call does not access or only reads memory. | |
void | setOnlyReadsMemory () |
bool | onlyWritesMemory ()const |
Determine if the call does not access or only writes memory. | |
void | setOnlyWritesMemory () |
bool | onlyAccessesArgMemory ()const |
Determine if the call can access memmory only using pointers based on its arguments. | |
void | setOnlyAccessesArgMemory () |
bool | onlyAccessesInaccessibleMemory ()const |
Determine if the function may only access memory that is inaccessible from the IR. | |
void | setOnlyAccessesInaccessibleMemory () |
bool | onlyAccessesInaccessibleMemOrArgMem ()const |
Determine if the function may only access memory that is either inaccessible from the IR or pointed to by its arguments. | |
void | setOnlyAccessesInaccessibleMemOrArgMem () |
bool | doesNotReturn ()const |
Determine if the call cannot return. | |
void | setDoesNotReturn () |
bool | doesNoCfCheck ()const |
Determine if the call should not perform indirect branch tracking. | |
bool | doesNotThrow ()const |
Determine if the call cannot unwind. | |
void | setDoesNotThrow () |
bool | cannotDuplicate ()const |
Determine if the invoke cannot be duplicated. | |
void | setCannotDuplicate () |
bool | cannotMerge ()const |
Determine if the call cannot be tail merged. | |
void | setCannotMerge () |
bool | isConvergent ()const |
Determine if the invoke is convergent. | |
void | setConvergent () |
void | setNotConvergent () |
bool | hasStructRetAttr ()const |
Determine if the call returns a structure through first pointer argument. | |
bool | hasByValArgument ()const |
Determine if any call argument is an aggregate passed by value. | |
![]() | |
iterator_range<simple_ilist<DbgRecord >::iterator > | cloneDebugInfoFrom (constInstruction *From, std::optional<simple_ilist<DbgRecord >::iterator > FromHere=std::nullopt,bool InsertAtHead=false) |
Clone any debug-info attached toFrom onto this instruction. | |
iterator_range<simple_ilist<DbgRecord >::iterator > | getDbgRecordRange ()const |
Return a range over the DbgRecords attached to this instruction. | |
std::optional<simple_ilist<DbgRecord >::iterator > | getDbgReinsertionPosition () |
Return an iterator to the position of the "Next"DbgRecord after this instruction, or std::nullopt. | |
bool | hasDbgRecords ()const |
Returns true if any DbgRecords are attached to this instruction. | |
void | adoptDbgRecords (BasicBlock *BB,InstListType::iterator It,bool InsertAtHead) |
Transfer any DbgRecords on the positionIt onto this instruction, by simply adopting the sequence of DbgRecords (which is efficient) if possible, by merging two sequences otherwise. | |
void | dropDbgRecords () |
Erase any DbgRecords attached to this instruction. | |
void | dropOneDbgRecord (DbgRecord *I) |
Erase a singleDbgRecordI that is attached to this instruction. | |
void | handleMarkerRemoval () |
Handle the debug-info implications of this instruction being removed. | |
Instruction (constInstruction &)=delete | |
Instruction & | operator= (constInstruction &)=delete |
Instruction * | user_back () |
Specialize the methods defined inValue, as we know that an instruction can only be used by other instructions. | |
constInstruction * | user_back ()const |
constModule * | getModule ()const |
Return the module owning the function this instruction belongs to or nullptr it the function does not have a module. | |
Module * | getModule () |
constFunction * | getFunction ()const |
Return the function this instruction belongs to. | |
Function * | getFunction () |
constDataLayout & | getDataLayout ()const |
Get the data layout of the module this instruction belongs to. | |
void | removeFromParent () |
This method unlinks 'this' from the containing basic block, but does not delete it. | |
InstListType::iterator | eraseFromParent () |
This method unlinks 'this' from the containing basic block and deletes it. | |
void | insertBefore (Instruction *InsertPos) |
Insert an unlinked instruction into a basic block immediately before the specified instruction. | |
void | insertBefore (InstListType::iterator InsertPos) |
Insert an unlinked instruction into a basic block immediately before the specified position. | |
void | insertAfter (Instruction *InsertPos) |
Insert an unlinked instruction into a basic block immediately after the specified instruction. | |
void | insertAfter (InstListType::iterator InsertPos) |
Insert an unlinked instruction into a basic block immediately after the specified position. | |
InstListType::iterator | insertInto (BasicBlock *ParentBB,InstListType::iterator It) |
Inserts an unlinked instruction intoParentBB at positionIt and returns the iterator of the inserted instruction. | |
void | insertBefore (BasicBlock &BB,InstListType::iterator InsertPos) |
void | moveBefore (Instruction *MovePos) |
Unlink this instruction from its current basic block and insert it into the basic block that MovePos lives in, right before MovePos. | |
void | moveBefore (InstListType::iterator InsertPos) |
Unlink this instruction from its current basic block and insert it into the basic block that MovePos lives in, right before MovePos. | |
void | moveBeforePreserving (InstListType::iterator MovePos) |
Perform amoveBefore operation, while signalling that the caller intends to preserve the original ordering of instructions. | |
void | moveBeforePreserving (BasicBlock &BB,InstListType::iteratorI) |
Perform amoveBefore operation, while signalling that the caller intends to preserve the original ordering of instructions. | |
void | moveBeforePreserving (Instruction *MovePos) |
Perform amoveBefore operation, while signalling that the caller intends to preserve the original ordering of instructions. | |
void | moveBefore (BasicBlock &BB,InstListType::iteratorI) |
Unlink this instruction and insert into BB before I. | |
void | moveAfter (Instruction *MovePos) |
Unlink this instruction from its current basic block and insert it into the basic block that MovePos lives in, right after MovePos. | |
void | moveAfter (InstListType::iterator MovePos) |
Unlink this instruction from its current basic block and insert it into the basic block that MovePos lives in, right after MovePos. | |
void | moveAfterPreserving (Instruction *MovePos) |
SeemoveBeforePreserving . | |
bool | comesBefore (constInstruction *Other)const |
Given an instruction Other in the same basic block as this instruction, return true if this instruction comes before Other. | |
std::optional<InstListType::iterator > | getInsertionPointAfterDef () |
Get the first insertion point at which the result of this instruction is defined. | |
unsigned | getOpcode ()const |
Returns a member of one of the enums like Instruction::Add. | |
constchar * | getOpcodeName ()const |
bool | isTerminator ()const |
bool | isUnaryOp ()const |
bool | isBinaryOp ()const |
bool | isIntDivRem ()const |
bool | isFPDivRem ()const |
bool | isShift ()const |
bool | isCast ()const |
bool | isFuncletPad ()const |
bool | isSpecialTerminator ()const |
bool | isOnlyUserOfAnyOperand () |
It checks if this instruction is the only user of at least one of its operands. | |
bool | isLogicalShift ()const |
Return true if this is a logical shift left or a logical shift right. | |
bool | isArithmeticShift ()const |
Return true if this is an arithmetic shift right. | |
bool | isBitwiseLogicOp ()const |
Return true if this is and/or/xor. | |
bool | hasMetadata ()const |
Return true if this instruction has any metadata attached to it. | |
bool | hasNonDebugLocLoopMetadata ()const |
bool | hasMetadataOtherThanDebugLoc ()const |
Return true if this instruction has metadata attached to it other than a debug location. | |
bool | hasMetadata (unsigned KindID)const |
Return true if this instruction has the given type of metadata attached. | |
bool | hasMetadata (StringRef Kind)const |
Return true if this instruction has the given type of metadata attached. | |
MDNode * | getMetadata (unsigned KindID)const |
Get the metadata of given kind attached to thisInstruction. | |
MDNode * | getMetadata (StringRef Kind)const |
Get the metadata of given kind attached to thisInstruction. | |
void | getAllMetadata (SmallVectorImpl< std::pair<unsigned,MDNode * > > &MDs)const |
Get all metadata attached to thisInstruction. | |
void | getAllMetadataOtherThanDebugLoc (SmallVectorImpl< std::pair<unsigned,MDNode * > > &MDs)const |
This does the same thing as getAllMetadata, except that it filters out the debug location. | |
void | setMetadata (unsigned KindID,MDNode *Node) |
Set the metadata of the specified kind to the specified node. | |
void | setMetadata (StringRef Kind,MDNode *Node) |
void | copyMetadata (constInstruction &SrcInst,ArrayRef<unsigned > WL=ArrayRef<unsigned >()) |
Copy metadata fromSrcInst to this instruction. | |
void | eraseMetadataIf (function_ref<bool(unsigned,MDNode *)> Pred) |
Erase all metadata that matches the predicate. | |
void | swapProfMetadata () |
If the instruction has "branch_weights" MD_prof metadata and theMDNode has three operands (including name string), swap the order of the metadata. | |
void | addAnnotationMetadata (StringRef Annotation) |
Adds an !annotation metadata node withAnnotation to this instruction. | |
void | addAnnotationMetadata (SmallVector<StringRef >Annotations) |
Adds an !annotation metadata node with an array ofAnnotations as a tuple to this instruction. | |
AAMDNodes | getAAMetadata ()const |
Returns theAA metadata for this instruction. | |
void | setAAMetadata (constAAMDNodes &N) |
Sets theAA metadata on this instruction from theAAMDNodes structure. | |
void | setNoSanitizeMetadata () |
Sets the nosanitize metadata on this instruction. | |
bool | extractProfTotalWeight (uint64_t &TotalVal)const |
Retrieve total raw weight values of a branch. | |
void | setDebugLoc (DebugLoc Loc) |
Set the debug location information for this instruction. | |
constDebugLoc & | getDebugLoc ()const |
Return the debug location for this node as aDebugLoc. | |
constDebugLoc & | getStableDebugLoc ()const |
Fetch the debug location for this node, unless this is a debug intrinsic, in which case fetch the debug location of the next non-debug node. | |
void | setHasNoUnsignedWrap (bool b=true) |
Set or clear the nuw flag on this instruction, which must be an operator which supports this flag. | |
void | setHasNoSignedWrap (bool b=true) |
Set or clear the nsw flag on this instruction, which must be an operator which supports this flag. | |
void | setIsExact (bool b=true) |
Set or clear the exact flag on this instruction, which must be an operator which supports this flag. | |
void | setNonNeg (bool b=true) |
Set or clear the nneg flag on this instruction, which must be a zext instruction. | |
bool | hasNoUnsignedWrap ()constLLVM_READONLY |
Determine whether the no unsigned wrap flag is set. | |
bool | hasNoSignedWrap ()constLLVM_READONLY |
Determine whether the no signed wrap flag is set. | |
bool | hasNonNeg ()constLLVM_READONLY |
Determine whether the the nneg flag is set. | |
bool | hasPoisonGeneratingFlags ()constLLVM_READONLY |
Return true if this operator has flags which may cause this instruction to evaluate to poison despite having non-poison inputs. | |
void | dropPoisonGeneratingFlags () |
Drops flags that may cause this instruction to evaluate to poison despite having non-poison inputs. | |
bool | hasPoisonGeneratingMetadata ()constLLVM_READONLY |
Return true if this instruction has poison-generating metadata. | |
void | dropPoisonGeneratingMetadata () |
Drops metadata that may generate poison. | |
bool | hasPoisonGeneratingReturnAttributes ()constLLVM_READONLY |
Return true if this instruction has poison-generating attribute. | |
void | dropPoisonGeneratingReturnAttributes () |
Drops return attributes that may generate poison. | |
bool | hasPoisonGeneratingAnnotations ()const |
Return true if this instruction has poison-generating flags, return attributes or metadata. | |
void | dropPoisonGeneratingAnnotations () |
Drops flags, return attributes and metadata that may generate poison. | |
void | dropUBImplyingAttrsAndUnknownMetadata (ArrayRef<unsigned > KnownIDs={}) |
This function drops non-debug unknown metadata (through dropUnknownNonDebugMetadata). | |
void | dropUBImplyingAttrsAndMetadata () |
Drop any attributes or metadata that can cause immediate undefined behavior. | |
bool | isExact ()constLLVM_READONLY |
Determine whether the exact flag is set. | |
void | setFast (boolB) |
Set or clear all fast-math-flags on this instruction, which must be an operator which supports this flag. | |
void | setHasAllowReassoc (boolB) |
Set or clear the reassociation flag on this instruction, which must be an operator which supports this flag. | |
void | setHasNoNaNs (boolB) |
Set or clear the no-nans flag on this instruction, which must be an operator which supports this flag. | |
void | setHasNoInfs (boolB) |
Set or clear the no-infs flag on this instruction, which must be an operator which supports this flag. | |
void | setHasNoSignedZeros (boolB) |
Set or clear the no-signed-zeros flag on this instruction, which must be an operator which supports this flag. | |
void | setHasAllowReciprocal (boolB) |
Set or clear the allow-reciprocal flag on this instruction, which must be an operator which supports this flag. | |
void | setHasAllowContract (boolB) |
Set or clear the allow-contract flag on this instruction, which must be an operator which supports this flag. | |
void | setHasApproxFunc (boolB) |
Set or clear the approximate-math-functions 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 operator which supports these flags. | |
void | copyFastMathFlags (FastMathFlags FMF) |
Convenience function for transferring all fast-math flag values to this instruction, which must be an operator which supports these flags. | |
bool | isFast ()constLLVM_READONLY |
Determine whether all fast-math-flags are set. | |
bool | hasAllowReassoc ()constLLVM_READONLY |
Determine whether the allow-reassociation flag is set. | |
bool | hasNoNaNs ()constLLVM_READONLY |
Determine whether the no-NaNs flag is set. | |
bool | hasNoInfs ()constLLVM_READONLY |
Determine whether the no-infs flag is set. | |
bool | hasNoSignedZeros ()constLLVM_READONLY |
Determine whether the no-signed-zeros flag is set. | |
bool | hasAllowReciprocal ()constLLVM_READONLY |
Determine whether the allow-reciprocal flag is set. | |
bool | hasAllowContract ()constLLVM_READONLY |
Determine whether the allow-contract flag is set. | |
bool | hasApproxFunc ()constLLVM_READONLY |
Determine whether the approximate-math-functions flag is set. | |
FastMathFlags | getFastMathFlags ()constLLVM_READONLY |
Convenience function for getting all the fast-math flags, which must be an operator which supports these flags. | |
void | copyFastMathFlags (constInstruction *I) |
Copy I's fast-math flags. | |
void | copyIRFlags (constValue *V,bool IncludeWrapFlags=true) |
Convenience method to copy supported exact, fast-math, and (optionally) wrapping flags from V to this instruction. | |
void | andIRFlags (constValue *V) |
Logical 'and' of any supported wrapping, exact, and fast-math flags of V and this instruction. | |
void | applyMergedLocation (DILocation *LocA,DILocation *LocB) |
Merge 2 debug locations and apply it to theInstruction. | |
void | updateLocationAfterHoist () |
Updates the debug location given that the instruction has been hoisted from a block to a predecessor of that block. | |
void | dropLocation () |
Drop the instruction's debug location. | |
void | mergeDIAssignID (ArrayRef<constInstruction * > SourceInstructions) |
Merge theDIAssignID metadata from this instruction and those attached to instructions inSourceInstructions . | |
bool | isAssociative ()constLLVM_READONLY |
Return true if the instruction is associative: | |
bool | isCommutative ()constLLVM_READONLY |
Return true if the instruction is commutative: | |
bool | isIdempotent ()const |
Return true if the instruction is idempotent: | |
bool | isNilpotent ()const |
Return true if the instruction is nilpotent: | |
bool | mayWriteToMemory ()constLLVM_READONLY |
Return true if this instruction may modify memory. | |
bool | mayReadFromMemory ()constLLVM_READONLY |
Return true if this instruction may read memory. | |
bool | mayReadOrWriteMemory ()const |
Return true if this instruction may read or write memory. | |
bool | isAtomic ()constLLVM_READONLY |
Return true if this instruction has an AtomicOrdering of unordered or higher. | |
bool | hasAtomicLoad ()constLLVM_READONLY |
Return true if this atomic instruction loads from memory. | |
bool | hasAtomicStore ()constLLVM_READONLY |
Return true if this atomic instruction stores to memory. | |
bool | isVolatile ()constLLVM_READONLY |
Return true if this instruction has a volatile memory access. | |
Type * | getAccessType ()constLLVM_READONLY |
Return the type this instruction accesses in memory, if any. | |
bool | mayThrow (bool IncludePhaseOneUnwind=false)constLLVM_READONLY |
Return true if this instruction may throw an exception. | |
bool | isFenceLike ()const |
Return true if this instruction behaves like a memory fence: it can load or store to memory location without being given a memory location. | |
bool | mayHaveSideEffects ()constLLVM_READONLY |
Return true if the instruction may have side effects. | |
bool | isSafeToRemove ()constLLVM_READONLY |
Return true if the instruction can be removed if the result is unused. | |
bool | willReturn ()constLLVM_READONLY |
Return true if the instruction will return (unwinding is considered as a form of returning control flow here). | |
bool | isEHPad ()const |
Return true if the instruction is a variety of EH-block. | |
bool | isLifetimeStartOrEnd ()constLLVM_READONLY |
Return true if the instruction is a llvm.lifetime.start or llvm.lifetime.end marker. | |
bool | isLaunderOrStripInvariantGroup ()constLLVM_READONLY |
Return true if the instruction is a llvm.launder.invariant.group or llvm.strip.invariant.group. | |
bool | isDebugOrPseudoInst ()constLLVM_READONLY |
Return true if the instruction is aDbgInfoIntrinsic orPseudoProbeInst. | |
constInstruction * | getNextNonDebugInstruction (bool SkipPseudoOp=false)const |
Return a pointer to the next non-debug instruction in the same basic block as 'this', or nullptr if no such instruction exists. | |
Instruction * | getNextNonDebugInstruction (bool SkipPseudoOp=false) |
constInstruction * | getPrevNonDebugInstruction (bool SkipPseudoOp=false)const |
Return a pointer to the previous non-debug instruction in the same basic block as 'this', or nullptr if no such instruction exists. | |
Instruction * | getPrevNonDebugInstruction (bool SkipPseudoOp=false) |
Instruction * | clone ()const |
Create a copy of 'this' instruction that is identical in all ways except the following: | |
bool | isIdenticalTo (constInstruction *I)constLLVM_READONLY |
Return true if the specified instruction is exactly identical to the current one. | |
bool | isIdenticalToWhenDefined (constInstruction *I,bool IntersectAttrs=false)constLLVM_READONLY |
This is like isIdenticalTo, except that it ignores the SubclassOptionalData flags, which may specify conditions under which the instruction's result is undefined. | |
bool | isSameOperationAs (constInstruction *I,unsigned flags=0)constLLVM_READONLY |
This function determines if the specified instruction executes the same operation as the current one. | |
bool | hasSameSpecialState (constInstruction *I2,bool IgnoreAlignment=false,bool IntersectAttrs=false)constLLVM_READONLY |
This function determines if the speficied instruction has the same "special" characteristics as the current one. | |
bool | isUsedOutsideOfBlock (constBasicBlock *BB)constLLVM_READONLY |
Return true if there are any uses of this instruction in blocks other than the specified block. | |
unsigned | getNumSuccessors ()constLLVM_READONLY |
Return the number of successors that this instruction has. | |
BasicBlock * | getSuccessor (unsignedIdx)constLLVM_READONLY |
Return the specified successor. This instruction must be a terminator. | |
void | setSuccessor (unsignedIdx,BasicBlock *BB) |
Update the specified successor to point at the provided block. | |
void | replaceSuccessorWith (BasicBlock *OldBB,BasicBlock *NewBB) |
Replace specified successor OldBB to point at the provided block. | |
void | dropUnknownNonDebugMetadata (ArrayRef<unsigned > KnownIDs={}) |
Drop all unknown metadata except for debug locations. | |
![]() | |
User (constUser &)=delete | |
void | operator delete (void *Usr) |
Free memory allocated forUser andUse objects. | |
void | operator delete (void *Usr,HungOffOperandsAllocMarker) |
Placement delete - required by std, called if the ctor throws. | |
void | operator delete (void *Usr,IntrusiveOperandsAllocMarker) |
Placement delete - required by std, called if the ctor throws. | |
void | operator delete (void *Usr,IntrusiveOperandsAndDescriptorAllocMarker) |
Placement delete - required by std, called if the ctor throws. | |
constUse * | getOperandList ()const |
Use * | getOperandList () |
Value * | getOperand (unsigned i)const |
void | setOperand (unsigned i,Value *Val) |
constUse & | getOperandUse (unsigned i)const |
Use & | getOperandUse (unsigned i) |
unsigned | getNumOperands ()const |
ArrayRef<constuint8_t > | getDescriptor ()const |
Returns the descriptor co-allocated with thisUser instance. | |
MutableArrayRef<uint8_t > | getDescriptor () |
Returns the descriptor co-allocated with thisUser instance. | |
void | setNumHungOffUseOperands (unsigned NumOps) |
Subclasses with hung off uses need to manage the operand count themselves. | |
bool | isDroppable ()const |
A droppable user is a user for which uses can be dropped without affecting correctness and should be dropped rather than preventing a transformation from happening. | |
op_iterator | op_begin () |
const_op_iterator | op_begin ()const |
op_iterator | op_end () |
const_op_iterator | op_end ()const |
op_range | operands () |
const_op_range | operands ()const |
value_op_iterator | value_op_begin () |
value_op_iterator | value_op_end () |
iterator_range<value_op_iterator > | operand_values () |
const_value_op_iterator | value_op_begin ()const |
const_value_op_iterator | value_op_end ()const |
iterator_range<const_value_op_iterator > | operand_values ()const |
void | dropAllReferences () |
Drop all references to operands. | |
bool | replaceUsesOfWith (Value *From,Value *To) |
Replace uses of oneValue with another. | |
![]() | |
Value (constValue &)=delete | |
Value & | operator= (constValue &)=delete |
void | deleteValue () |
Delete a pointer to a genericValue. | |
void | dump ()const |
Support for debugging, callable in GDB: V->dump() | |
Type * | getType ()const |
All values are typed, get the type of this value. | |
LLVMContext & | getContext ()const |
All values hold a context through their type. | |
bool | hasName ()const |
ValueName * | getValueName ()const |
void | setValueName (ValueName *VN) |
StringRef | getName ()const |
Return a constant reference to the value's name. | |
void | setName (constTwine &Name) |
Change the name of the value. | |
void | takeName (Value *V) |
Transfer the name from V to this value. | |
std::string | getNameOrAsOperand ()const |
void | replaceAllUsesWith (Value *V) |
Change all uses of this to point to a newValue. | |
void | replaceNonMetadataUsesWith (Value *V) |
Change non-metadata uses of this to point to a newValue. | |
void | replaceUsesWithIf (Value *New,llvm::function_ref<bool(Use &U)> ShouldReplace) |
Go through the uses list for this definition and make each use point to "V" if the callback ShouldReplace returns true for the givenUse. | |
void | replaceUsesOutsideBlock (Value *V,BasicBlock *BB) |
replaceUsesOutsideBlock - Go through the uses list for this definition and make each use point to "V" instead of "this" when the use is outside the block. | |
void | assertModuleIsMaterializedImpl ()const |
void | assertModuleIsMaterialized ()const |
bool | use_empty ()const |
bool | materialized_use_empty ()const |
use_iterator | materialized_use_begin () |
const_use_iterator | materialized_use_begin ()const |
use_iterator | use_begin () |
const_use_iterator | use_begin ()const |
use_iterator | use_end () |
const_use_iterator | use_end ()const |
iterator_range<use_iterator > | materialized_uses () |
iterator_range<const_use_iterator > | materialized_uses ()const |
iterator_range<use_iterator > | uses () |
iterator_range<const_use_iterator > | uses ()const |
bool | user_empty ()const |
user_iterator | materialized_user_begin () |
const_user_iterator | materialized_user_begin ()const |
user_iterator | user_begin () |
const_user_iterator | user_begin ()const |
user_iterator | user_end () |
const_user_iterator | user_end ()const |
User * | user_back () |
constUser * | user_back ()const |
iterator_range<user_iterator > | materialized_users () |
iterator_range<const_user_iterator > | materialized_users ()const |
iterator_range<user_iterator > | users () |
iterator_range<const_user_iterator > | users ()const |
bool | hasOneUse ()const |
Return true if there is exactly one use of this value. | |
bool | hasNUses (unsignedN)const |
Return true if thisValue has exactly N uses. | |
bool | hasNUsesOrMore (unsignedN)const |
Return true if this value has N uses or more. | |
bool | hasOneUser ()const |
Return true if there is exactly one user of this value. | |
Use * | getSingleUndroppableUse () |
Return true if there is exactly one use of this value that cannot be dropped. | |
constUse * | getSingleUndroppableUse ()const |
User * | getUniqueUndroppableUser () |
Return true if there is exactly one unique user of this value that cannot be dropped (that user can have multiple uses of this value). | |
constUser * | getUniqueUndroppableUser ()const |
bool | hasNUndroppableUses (unsignedN)const |
Return true if there this value. | |
bool | hasNUndroppableUsesOrMore (unsignedN)const |
Return true if this value has N uses or more. | |
void | dropDroppableUses (llvm::function_ref<bool(constUse *)> ShouldDrop=[](constUse *) { returntrue;}) |
Remove every uses that can safely be removed. | |
void | dropDroppableUsesIn (User &Usr) |
Remove every use of this value inUser that can safely be removed. | |
bool | isUsedInBasicBlock (constBasicBlock *BB)const |
Check if this value is used in the specified basic block. | |
unsigned | getNumUses ()const |
This method computes the number of uses of thisValue. | |
void | addUse (Use &U) |
This method should only be used by theUse class. | |
unsigned | getValueID ()const |
Return an ID for the concrete type of this object. | |
unsigned | getRawSubclassOptionalData ()const |
Return the raw optional flags value contained in this value. | |
void | clearSubclassOptionalData () |
Clear the optional flags contained in this value. | |
bool | hasSameSubclassOptionalData (constValue *V)const |
Check the optional flags for equality. | |
bool | hasValueHandle ()const |
Return true if there is a value handle associated with this value. | |
bool | isUsedByMetadata ()const |
Return true if there is metadata referencing this value. | |
bool | isSwiftError ()const |
Return true if this value is a swifterror value. | |
constValue * | stripPointerCasts ()const |
Strip off pointer casts, all-zero GEPs and address space casts. | |
Value * | stripPointerCasts () |
constValue * | stripPointerCastsAndAliases ()const |
Strip off pointer casts, all-zero GEPs, address space casts, and aliases. | |
Value * | stripPointerCastsAndAliases () |
constValue * | stripPointerCastsSameRepresentation ()const |
Strip off pointer casts, all-zero GEPs and address space casts but ensures the representation of the result stays the same. | |
Value * | stripPointerCastsSameRepresentation () |
constValue * | stripPointerCastsForAliasAnalysis ()const |
Strip off pointer casts, all-zero GEPs, single-argument phi nodes and invariant group info. | |
Value * | stripPointerCastsForAliasAnalysis () |
constValue * | stripInBoundsConstantOffsets ()const |
Strip off pointer casts and all-constant inbounds GEPs. | |
Value * | stripInBoundsConstantOffsets () |
constValue * | stripAndAccumulateConstantOffsets (constDataLayout &DL,APInt &Offset,bool AllowNonInbounds,bool AllowInvariantGroup=false,function_ref<bool(Value &Value,APInt &Offset)> ExternalAnalysis=nullptr)const |
Accumulate the constant offset this value has compared to a base pointer. | |
Value * | stripAndAccumulateConstantOffsets (constDataLayout &DL,APInt &Offset,bool AllowNonInbounds,bool AllowInvariantGroup=false,function_ref<bool(Value &Value,APInt &Offset)> ExternalAnalysis=nullptr) |
constValue * | stripAndAccumulateInBoundsConstantOffsets (constDataLayout &DL,APInt &Offset)const |
This is a wrapper around stripAndAccumulateConstantOffsets with the in-bounds requirement set to false. | |
Value * | stripAndAccumulateInBoundsConstantOffsets (constDataLayout &DL,APInt &Offset) |
constValue * | stripInBoundsOffsets (function_ref< void(constValue *)> Func=[](constValue *) {})const |
Strip off pointer casts and inbounds GEPs. | |
Value * | stripInBoundsOffsets (function_ref< void(constValue *)> Func=[](constValue *) {}) |
std::optional< int64_t > | getPointerOffsetFrom (constValue *Other,constDataLayout &DL)const |
If this ptr is provably equal toOther plus a constant offset, return that offset in bytes. | |
bool | canBeFreed ()const |
Return true if the memory object referred to by V can by freed in the scope for which the SSA value defining the allocation is statically defined. | |
uint64_t | getPointerDereferenceableBytes (constDataLayout &DL,bool &CanBeNull,bool &CanBeFreed)const |
Returns the number of bytes known to be dereferenceable for the pointer value. | |
Align | getPointerAlignment (constDataLayout &DL)const |
Returns an alignment of the pointer value. | |
constValue * | DoPHITranslation (constBasicBlock *CurBB,constBasicBlock *PredBB)const |
Translate PHI node to its predecessor from the given basic block. | |
Value * | DoPHITranslation (constBasicBlock *CurBB,constBasicBlock *PredBB) |
void | mutateType (Type *Ty) |
Mutate the type of thisValue to be of the specified type. | |
template<class Compare > | |
void | sortUseList (Compare Cmp) |
Sort the use-list. | |
void | reverseUseList () |
Reverse the use-list. | |
void | print (raw_ostream &O,bool IsForDebug=false)const |
Implement operator<< onValue. | |
void | print (raw_ostream &O,ModuleSlotTracker &MST,bool IsForDebug=false)const |
void | printAsOperand (raw_ostream &O,bool PrintType=true,constModule *M=nullptr)const |
Print the name of thisValue out to the specifiedraw_ostream. | |
void | printAsOperand (raw_ostream &O,bool PrintType,ModuleSlotTracker &MST)const |
![]() | |
Instruction * | getPrevNode () |
constInstruction * | getPrevNode ()const |
Get the previous node, ornullptr for the list head. | |
Instruction * | getNextNode () |
Get the next node, ornullptr for the list tail. | |
constInstruction * | getNextNode ()const |
Get the next node, ornullptr for the list tail. | |
![]() | |
self_iterator | getIterator () |
const_self_iterator | getIterator ()const |
reverse_self_iterator | getReverseIterator () |
const_reverse_self_iterator | getReverseIterator ()const |
bool | isSentinel ()const |
Check whether this is the sentinel node. | |
![]() | |
const ParentTy * | getParent ()const |
ParentTy * | getParent () |
void | setParent (ParentTy *Parent) |
Static Public Member Functions | |
staticCallBase * | Create (CallBase *CB,ArrayRef<OperandBundleDef > Bundles,InsertPosition InsertPt=nullptr) |
Create a clone ofCB with a different set of operand bundles and insert it beforeInsertPt . | |
staticCallBase * | Create (CallBase *CB,OperandBundleDef Bundle,InsertPosition InsertPt=nullptr) |
Create a clone ofCB with the operand bundle with the tag matchingBundle's tag replaced with Bundle, and insert it beforeInsertPt . | |
staticCallBase * | addOperandBundle (CallBase *CB,uint32_tID,OperandBundleDef OB,InsertPosition InsertPt=nullptr) |
Create a clone ofCB with operand bundleOB added. | |
staticCallBase * | removeOperandBundle (CallBase *CB,uint32_tID,InsertPosition InsertPt=nullptr) |
Create a clone ofCB with operand bundleID removed. | |
staticbool | classof (constInstruction *I) |
staticbool | classof (constValue *V) |
![]() | |
staticconstchar * | getOpcodeName (unsigned Opcode) |
staticbool | isTerminator (unsigned Opcode) |
staticbool | isUnaryOp (unsigned Opcode) |
staticbool | isBinaryOp (unsigned Opcode) |
staticbool | isIntDivRem (unsigned Opcode) |
staticbool | isFPDivRem (unsigned Opcode) |
staticbool | isShift (unsigned Opcode) |
Determine if the Opcode is one of the shift instructions. | |
staticbool | isBitwiseLogicOp (unsigned Opcode) |
Determine if the Opcode is and/or/xor. | |
staticbool | isCast (unsigned Opcode) |
Determine if the Opcode is one of theCastInst instructions. | |
staticbool | isFuncletPad (unsigned Opcode) |
Determine if the Opcode is one of theFuncletPadInst instructions. | |
staticbool | isSpecialTerminator (unsigned Opcode) |
Returns true if the Opcode is a "special" terminator that does more than branch to a successor (e.g. | |
staticbool | isAssociative (unsigned Opcode) |
staticbool | isCommutative (unsigned Opcode) |
staticbool | isIdempotent (unsigned Opcode) |
staticbool | isNilpotent (unsigned Opcode) |
staticbool | classof (constValue *V) |
Methods for support type inquiry through isa, cast, and dyn_cast: | |
![]() | |
staticbool | classof (constValue *V) |
![]() | |
static void | dropDroppableUse (Use &U) |
Remove the droppable useU . | |
Protected Member Functions | |
template<class... ArgsTy> | |
CallBase (AttributeListconst &A,FunctionType *FT, ArgsTy &&... Args) | |
bool | hasDescriptor ()const |
unsigned | getNumSubclassExtraOperands ()const |
unsigned | getNumSubclassExtraOperandsDynamic ()const |
Get the number of extra operands for instructions that don't have a fixed number of extra operands. | |
Instruction (constInstruction &)=delete | |
Instruction (Type *Ty,unsigned iType,AllocInfoAllocInfo,InsertPosition InsertBefore=nullptr) | |
![]() | |
~Instruction () | |
template<typename BitfieldElement > | |
BitfieldElement::Type | getSubclassData ()const |
template<typename BitfieldElement > | |
void | setSubclassData (typename BitfieldElement::TypeValue) |
Instruction (Type *Ty,unsigned iType,AllocInfoAllocInfo,InsertPosition InsertBefore=nullptr) | |
![]() | |
void * | operator new (size_tSize)=delete |
void * | operator new (size_tSize,HungOffOperandsAllocMarker) |
Allocate aUser with an operand pointer co-allocated. | |
void * | operator new (size_tSize,IntrusiveOperandsAllocMarker allocTrait) |
Allocate aUser with the operands co-allocated. | |
void * | operator new (size_tSize,IntrusiveOperandsAndDescriptorAllocMarker allocTrait) |
Allocate aUser with the operands co-allocated. | |
User (Type *ty,unsigned vty,AllocInfoAllocInfo) | |
void | allocHungoffUses (unsignedN,bool IsPhi=false) |
Allocate the array of Uses, followed by a pointer (with bottom bit set) to theUser. | |
void | growHungoffUses (unsignedN,bool IsPhi=false) |
Grow the number of hung off uses. | |
~User ()=default | |
template<int Idx> | |
Use & | Op () |
template<int Idx> | |
constUse & | Op ()const |
![]() | |
Value (Type *Ty,unsigned scid) | |
~Value () | |
Value's destructor should be virtual by design, but that would require thatValue and all of its subclasses have a vtable that effectively duplicates the information in the value ID. | |
void | getAllMetadata (SmallVectorImpl< std::pair<unsigned,MDNode * > > &MDs)const |
Appends all metadata attached to this value toMDs , sorting by KindID. | |
bool | hasMetadata ()const |
Return true if this value has any metadata attached to it. | |
bool | eraseMetadata (unsigned KindID) |
Erase all metadata attachments with the given kind. | |
void | eraseMetadataIf (function_ref<bool(unsigned,MDNode *)> Pred) |
Erase all metadata attachments matching the given predicate. | |
void | clearMetadata () |
Erase all metadata attached to thisValue. | |
MDNode * | getMetadataImpl (unsigned KindID)const |
Get metadata for the given kind, if any. | |
unsigned short | getSubclassDataFromValue ()const |
void | setValueSubclassData (unsigned shortD) |
MDNode * | getMetadata (unsigned KindID)const |
Get the current metadata attachments for the given kind, if any. | |
MDNode * | getMetadata (StringRef Kind)const |
void | getMetadata (unsigned KindID,SmallVectorImpl<MDNode * > &MDs)const |
Appends all attachments with the given ID toMDs in insertion order. | |
void | getMetadata (StringRef Kind,SmallVectorImpl<MDNode * > &MDs)const |
bool | hasMetadata (unsigned KindID)const |
Return true if this value has the given type of metadata attached. | |
bool | hasMetadata (StringRef Kind)const |
void | setMetadata (unsigned KindID,MDNode *Node) |
Set a particular kind of metadata attachment. | |
void | setMetadata (StringRef Kind,MDNode *Node) |
void | addMetadata (unsigned KindID,MDNode &MD) |
Add a metadata attachment. | |
void | addMetadata (StringRef Kind,MDNode &MD) |
![]() | |
ilist_node_with_parent ()=default | |
![]() | |
ilist_node_impl ()=default | |
Protected Attributes | |
AttributeList | Attrs |
parameter attributes for callable | |
FunctionType * | FTy |
![]() | |
unsignedchar | SubclassOptionalData: 7 |
Hold subclass data that can be dropped. | |
unsigned | NumUserOperands:NumUserOperandsBits |
unsigned | IsUsedByMD: 1 |
unsigned | HasName: 1 |
unsigned | HasMetadata: 1 |
unsigned | HasHungOffUses: 1 |
unsigned | HasDescriptor: 1 |
Static Protected Attributes | |
static constexpr int | CalledOperandOpEndIdx = -1 |
The last operand is the called operand. | |
Operand Bundle API | |
This group of methods provides the API to access and manipulate operand bundles on this call. | |
using | bundle_op_iterator =BundleOpInfo * |
using | const_bundle_op_iterator =constBundleOpInfo * |
unsigned | getNumOperandBundles ()const |
Return the number of operand bundles associated with thisUser. | |
bool | hasOperandBundles ()const |
Return true if thisUser has any operand bundles. | |
unsigned | getBundleOperandsStartIndex ()const |
Return the index of the first bundle operand in theUse array. | |
unsigned | getBundleOperandsEndIndex ()const |
Return the index of the last bundle operand in theUse array. | |
bool | isBundleOperand (unsignedIdx)const |
Return true if the operand at indexIdx is a bundle operand. | |
bool | isOperandBundleOfType (uint32_tID,unsignedIdx)const |
Return true if the operand at indexIdx is a bundle operand that has tag IDID . | |
bool | isBundleOperand (constUse *U)const |
Returns true if the use is a bundle operand. | |
bool | isBundleOperand (Value::const_user_iterator UI)const |
unsigned | getNumTotalBundleOperands ()const |
Return the total number operands (not operand bundles) used by every operand bundle in this OperandBundleUser. | |
OperandBundleUse | getOperandBundleAt (unsignedIndex)const |
Return the operand bundle at a specific index. | |
unsigned | countOperandBundlesOfType (StringRefName)const |
Return the number of operand bundles with the tag Name attached to this instruction. | |
unsigned | countOperandBundlesOfType (uint32_tID)const |
Return the number of operand bundles with the tag ID attached to this instruction. | |
std::optional<OperandBundleUse > | getOperandBundle (StringRefName)const |
Return an operand bundle by name, if present. | |
std::optional<OperandBundleUse > | getOperandBundle (uint32_tID)const |
Return an operand bundle by tag ID, if present. | |
void | getOperandBundlesAsDefs (SmallVectorImpl<OperandBundleDef > &Defs)const |
Return the list of operand bundles attached to this instruction as a vector of OperandBundleDefs. | |
OperandBundleUse | getOperandBundleForOperand (unsigned OpIdx)const |
Return the operand bundle for the operand at index OpIdx. | |
bool | hasReadingOperandBundles ()const |
Return true if this operand bundle user has operand bundles that may read from the heap. | |
bool | hasClobberingOperandBundles ()const |
Return true if this operand bundle user has operand bundles that may write to the heap. | |
bool | bundleOperandHasAttr (unsigned OpIdx,Attribute::AttrKindA)const |
Return true if the bundle operand at indexOpIdx has the attributeA . | |
bool | hasIdenticalOperandBundleSchema (constCallBase &Other)const |
Return true ifOther has the same sequence of operand bundle tags with the same number of operands on each one of them as this OperandBundleUser. | |
bool | hasOperandBundlesOtherThan (ArrayRef<uint32_t > IDs)const |
Return true if this operand bundle user contains operand bundles with tags other than those specified inIDs . | |
OperandBundleUse | operandBundleFromBundleOpInfo (constBundleOpInfo &BOI)const |
Simple helper function to map aBundleOpInfo to anOperandBundleUse. | |
bundle_op_iterator | bundle_op_info_begin () |
Return the start of the list ofBundleOpInfo instances associated with this OperandBundleUser. | |
const_bundle_op_iterator | bundle_op_info_begin ()const |
Return the start of the list ofBundleOpInfo instances associated with this OperandBundleUser. | |
bundle_op_iterator | bundle_op_info_end () |
Return the end of the list ofBundleOpInfo instances associated with this OperandBundleUser. | |
const_bundle_op_iterator | bundle_op_info_end ()const |
Return the end of the list ofBundleOpInfo instances associated with this OperandBundleUser. | |
iterator_range<bundle_op_iterator > | bundle_op_infos () |
Return the range [bundle_op_info_begin ,bundle_op_info_end ). | |
iterator_range<const_bundle_op_iterator > | bundle_op_infos ()const |
Return the range [bundle_op_info_begin ,bundle_op_info_end ). | |
op_iterator | populateBundleOperandInfos (ArrayRef<OperandBundleDef > Bundles,constunsigned BeginIndex) |
Populate theBundleOpInfo instances and theUse& vector fromBundles . | |
bool | hasDeoptState ()const |
Return true if the call has deopt state bundle. | |
BundleOpInfo & | getBundleOpInfoForOperand (unsigned OpIdx) |
Return theBundleOpInfo for the operand at index OpIdx. | |
constBundleOpInfo & | getBundleOpInfoForOperand (unsigned OpIdx)const |
staticunsigned | CountBundleInputs (ArrayRef<OperandBundleDef > Bundles) |
Return the total number of values used inBundles . | |
Additional Inherited Members | |
![]() | |
enum | OperationEquivalenceFlags {CompareIgnoringAlignment = 1 << 0,CompareUsingScalarTypes = 1 << 1,CompareUsingIntersectedAttrs = 1 << 2 } |
When checking for operation equivalence (using isSameOperationAs) it is sometimes useful to ignore certain attributes.More... | |
enum | TermOps |
enum | UnaryOps |
enum | BinaryOps |
enum | MemoryOps |
enum | CastOps |
enum | FuncletPadOps |
enum | OtherOps |
using | InstListType =SymbolTableList<Instruction,ilist_iterator_bits<true >,ilist_parent<BasicBlock > > |
![]() | |
using | op_iterator =Use * |
using | const_op_iterator =constUse * |
using | op_range =iterator_range<op_iterator > |
using | const_op_range =iterator_range<const_op_iterator > |
![]() | |
enum | ValueTy |
Concrete subclass of this.More... | |
using | use_iterator = use_iterator_impl<Use > |
using | const_use_iterator = use_iterator_impl<constUse > |
using | user_iterator = user_iterator_impl<User > |
using | const_user_iterator = user_iterator_impl<constUser > |
![]() | |
DbgMarker * | DebugMarker = nullptr |
Optional marker recording the position for debugging information that takes effect immediately before this instruction. | |
![]() | |
static constexprunsigned | MaxAlignmentExponent = 32 |
The maximum alignment for instructions. | |
static constexpruint64_t | MaximumAlignment = 1ULL <<MaxAlignmentExponent |
![]() | |
template<int Idx, typename U > | |
staticUse & | OpFrom (const U *that) |
Base class for all callable instructions (InvokeInst andCallInst) Holds everything related to calling a function.
All call-like instructions are required to use a common operand layout:
This allows this base class to easily access the called function and the start of the arguments without knowing how many other operands a particular subclass requires. Note that accessing the end of the argument list isn't as cheap as most other operations on the base class.
Definition at line1112 of fileInstrTypes.h.
Definition at line2165 of fileInstrTypes.h.
| protected |
Definition at line1116 of fileInstrTypes.h.
| protected |
Definition at line1115 of fileInstrTypes.h.
Definition at line2166 of fileInstrTypes.h.
| inlineprotected |
Definition at line1130 of fileInstrTypes.h.
adds the attribute to the list of attributes.
Definition at line1469 of fileInstrTypes.h.
Referencesllvm::AttributeList::addAttributeAtIndex(),Attrs, andllvm::Value::getContext().
| inline |
adds the attribute to the list of attributes.
Definition at line1464 of fileInstrTypes.h.
Referencesllvm::AttributeList::addAttributeAtIndex(),Attrs, andllvm::Value::getContext().
adds the dereferenceable attribute to the list of attributes.
Definition at line1558 of fileInstrTypes.h.
Referencesllvm::AttributeList::addDereferenceableParamAttr(),Attrs, andllvm::Value::getContext().
| inline |
adds the dereferenceable attribute to the list of attributes.
Definition at line1563 of fileInstrTypes.h.
Referencesllvm::AttributeList::addDereferenceableRetAttr(),Attrs, andllvm::Value::getContext().
| inline |
Adds the attribute to the function.
Definition at line1479 of fileInstrTypes.h.
Referencesllvm::AttributeList::addFnAttribute(),Attrs, andllvm::Value::getContext().
| inline |
Adds the attribute to the function.
Definition at line1474 of fileInstrTypes.h.
Referencesllvm::AttributeList::addFnAttribute(),Attrs, andllvm::Value::getContext().
Referenced byaddAllocTypeAttribute(),addBoundsChecking(),llvm::Attributor::createShallowWrapper(),llvm::GCNTTIImpl::instCombineIntrinsic(),llvm::maybeMarkSanitizerLibraryCallNoBuiltin(),setCannotDuplicate(),setCannotMerge(),llvm::CallInst::setCanReturnTwice(),setConvergent(),setDoesNotReturn(),setDoesNotThrow(),llvm::setInlineRemark(),setIsNoInline(),setMemoryEffects(), andllvm::VFABI::setVectorVariantNames().
| static |
Create a clone ofCB
with operand bundleOB
added.
Definition at line562 of fileInstructions.cpp.
ReferencesCreate(),getOperandBundle(),getOperandBundlesAsDefs(), andllvm::SmallVectorTemplateBase< T, bool >::push_back().
Referenced byinlineRetainOrClaimRVCalls().
Adds the attribute to the indicated argument.
Definition at line1500 of fileInstrTypes.h.
Referencesllvm::AttributeList::addParamAttribute(),arg_size(),assert(),Attrs, andllvm::Value::getContext().
| inline |
Adds the attribute to the indicated argument.
Definition at line1494 of fileInstrTypes.h.
Referencesllvm::AttributeList::addParamAttribute(),arg_size(),assert(),Attrs, andllvm::Value::getContext().
Referenced byaddNonNullAttribute(),annotateDereferenceableBytes(),annotateNonNullNoUndefBasedOnAccess(),llvm::IRBuilderBase::CreateElementUnorderedAtomicMemMove(),CreateGCStatepointCallCommon(),llvm::IRBuilderBase::CreateMaskedCompressStore(),llvm::IRBuilderBase::CreateMaskedExpandLoad(),llvm::IRBuilderBase::CreatePreserveArrayAccessIndex(),llvm::IRBuilderBase::CreatePreserveStructAccessIndex(),llvm::IRBuilderBase::CreateThreadLocalAddress(),llvm::AArch64TargetLowering::emitLoadLinked(),llvm::ARMTargetLowering::emitLoadLinked(),llvm::AArch64TargetLowering::emitStoreConditional(),llvm::ARMTargetLowering::emitStoreConditional(),llvm::VPWidenLoadEVLRecipe::execute(),llvm::VPWidenStoreEVLRecipe::execute(),llvm::RISCVTargetLowering::lowerInterleavedLoad(),llvm::RISCVTargetLowering::lowerInterleavedStore(),lowerObjCCall(),promoteArguments(), andllvm::MemIntrinsicBase< Derived >::setDestAlignment().
| inline |
adds the range attribute to the list of attributes.
Definition at line1568 of fileInstrTypes.h.
Referencesllvm::AttributeList::addRangeRetAttr(),Attrs, andllvm::Value::getContext().
Referenced byhoistConditionalLoadsStores().
| inline |
Adds the attribute to the return value.
Definition at line1489 of fileInstrTypes.h.
Referencesllvm::AttributeList::addRetAttribute(),Attrs, andllvm::Value::getContext().
| inline |
Adds the attribute to the return value.
Definition at line1484 of fileInstrTypes.h.
Referencesllvm::AttributeList::addRetAttribute(),Attrs, andllvm::Value::getContext().
Referenced byllvm::IRBuilderBase::CreateThreadLocalAddress(),lowerKernelArguments(), andllvm::InstCombinerImpl::visitCallInst().
| inline |
Return the iterator pointing to the beginning of the argument list.
Definition at line1261 of fileInstrTypes.h.
Referencesllvm::User::op_begin().
Referenced byllvm::GCStatepointInst::actual_arg_begin(),arg_begin(),arg_empty(),arg_size(),args(),llvm::CallBrInst::Create(),llvm::CallInst::Create(),doPromotion(),llvm::MLInlineAdvisor::getAdviceImpl(),getArgOperandNo(),llvm::AbstractCallSite::getCallbackUses(),llvm::AAResults::getModRefInfo(),hasSameArgumentList(),hostParallelCallback(),llvm::InlineFunction(),llvm::IntrinsicCostAttributes::IntrinsicCostAttributes(),isArgOperand(),isCondRelevantToAnyCallArgument(),llvm::FastISel::lowerCall(),llvm::SelectionDAGBuilder::LowerCallTo(),processCall(),ReplaceFPIntrinsicWithCall(),llvm::CoroEndResults::retval_begin(),targetParallelCallback(), andllvm::CoroSuspendRetconInst::value_begin().
| inline |
Definition at line1262 of fileInstrTypes.h.
Referencesarg_begin().
| inline |
Definition at line1283 of fileInstrTypes.h.
Referencesarg_begin(), andarg_end().
Referenced bycomputeBytesPoppedByCalleeForSRet(),hasInAllocaArgument(), andhasStructRetAttr().
| inline |
Return the iterator pointing to the end of the argument list.
Definition at line1267 of fileInstrTypes.h.
Referencesdata_operands_end(), andgetNumTotalBundleOperands().
Referenced byllvm::GCStatepointInst::actual_arg_end(),arg_empty(),arg_end(),arg_size(),args(),llvm::CallBrInst::Create(),llvm::CallInst::Create(),llvm::GCStatepointInst::deopt_begin(),llvm::GCStatepointInst::deopt_end(),doPromotion(),llvm::GCStatepointInst::gc_live_begin(),llvm::GCStatepointInst::gc_live_end(),llvm::GCStatepointInst::gc_transition_args_begin(),llvm::GCStatepointInst::gc_transition_args_end(),llvm::MLInlineAdvisor::getAdviceImpl(),llvm::AAResults::getModRefInfo(),hasSameArgumentList(),hostParallelCallback(),llvm::IntrinsicCostAttributes::IntrinsicCostAttributes(),isArgOperand(),isCondRelevantToAnyCallArgument(),llvm::FastISel::lowerCall(),llvm::SelectionDAGBuilder::LowerCallTo(),processCall(),ReplaceFPIntrinsicWithCall(),llvm::CoroEndResults::retval_end(), andllvm::CoroSuspendRetconInst::value_end().
| inline |
Definition at line1272 of fileInstrTypes.h.
Referencesarg_end().
| inline |
Definition at line1284 of fileInstrTypes.h.
Referencesarg_begin(), andarg_end().
Referenced byllvm::AbstractCallSite::AbstractCallSite(),llvm::GCStatepointInst::actual_arg_begin(),AddParamAndFnBasicAttributes(),addParamAttr(),llvm::OpenMPIRBuilder::createTask(),llvm::OpenMPIRBuilder::createTeams(),dataOperandHasImpliedAttr(),doesNotCapture(),llvm::OpenMPIRBuilder::emitTargetTask(),emitTargetTaskProxyFunction(),getAllocationSize(),getArgOperand(),getArgOperandUse(),getBundleOpInfoForOperand(),llvm::AbstractCallSite::getCallbackUses(),llvm::ConstrainedFPIntrinsic::getExceptionBehavior(),llvm::MemoryLocation::getForDest(),llvm::CallBrInst::getIndirectDestLabel(),llvm::CallBrInst::getIndirectDestLabelUse(),llvm::CoroAsyncEndInst::getMustTailCallFunction(),llvm::ConstrainedFPIntrinsic::getNonMetadataArgCount(),llvm::AbstractCallSite::getNumArgOperands(),llvm::AArch64TTIImpl::getOrCreateResultFromMemIntrinsic(),getParamAttr(),llvm::ConstrainedFPIntrinsic::getRoundingMode(),llvm::SITargetLowering::getTgtMemIntrinsic(),llvm::AArch64TTIImpl::getTgtMemIntrinsic(),handleGuaranteedWellDefinedOps(),hasInAllocaArgument(),hasSameArgumentList(),haveSameOperands(),llvm::InlineFunction(),llvm::isLegalToPromote(),isReportingError(),llvm::FastISel::lowerCall(),llvm::SelectionDAGBuilder::LowerCallTo(),llvm::IntrinsicLowering::LowerToByteSwap(),mergeAttributesAndFlags(),onlyReadsMemory(),OptimizeAwayTrappingUsesOfValue(),paramHasAttr(),processCallSite(),removeParamAttr(),removeTriviallyEmptyRange(),setArgOperand(),setInfoSVEStN(),llvm::Attributor::translateArgumentToCallSiteContent(),tryToSplitCallSite(),upgradeAbs(),llvm::UpgradeARCRuntime(),upgradeAVX512MaskToSelect(),upgradeDbgIntrinsicToDbgRecord(),llvm::UpgradeIntrinsicCall(),upgradeMaskedCompare(),upgradePMULDQ(),upgradeX86BinaryIntrinsics(),upgradeX86ConcatShift(),upgradeX86IntrinsicCall(),upgradeX86Rotate(),llvm::Interpreter::visitCallBase(), andworkshareLoopTargetCallback().
| inline |
Iteration adapter for range-for loops.
Definition at line1277 of fileInstrTypes.h.
Referencesarg_begin(),arg_end(), andllvm::make_range().
Referenced byaddNonNullAttribute(),adjustInliningThresholdUsingCallee(),buildIntrinsicArgTypes(),llvm::changeToInvokeAndSplitBasicBlock(),collectEscapedLocals(),doesInTreeUserNeedToExtract(),getCallArgsTotalAllocaSize(),llvm::objcarc::GetCallSiteClass(),llvm::LoopVectorizationCostModel::getVectorCallCost(),llvm::LoopVectorizationCostModel::getVectorIntrinsicCost(),hasArgument(),llvm::InlineFunction(),isPredicatedOnPHI(),llvm::CallLowering::lowerCall(),llvm::makeGuardControlFlowExplicit(),markTails(),modifyIntrinsicCall(),processCallSite(),runIPSCCP(),setConstantInArgument(),llvm::LoopVectorizationCostModel::setVectorizedCallDecision(),splitCallSite(),upgradeAArch64IntrinsicCall(),upgradeARMIntrinsicCall(),upgradeAVX512MaskToSelect(),llvm::UpgradeIntrinsicCall(),upgradeX86IntrinsicCall(),llvm::Interpreter::visitCallBase(), andllvm::InstCombinerImpl::visitCallInst().
| inline |
Definition at line1280 of fileInstrTypes.h.
Referencesarg_begin(),arg_end(), andllvm::make_range().
| inline |
Return the start of the list ofBundleOpInfo instances associated with this OperandBundleUser.
OperandBundleUser uses the descriptor area co-allocated with the hostUser to store some meta information about which operands are "normal" operands, and which ones belong to some operand bundle.
The layout of an operand bundle user is
+-----------uint32_t End-------------------------------------+ | | | +--------uint32_t Begin--------------------+ | | | | | ^ ^ v v
|---—|---—|-—|-—|-—|-—|-—|------—|-—|------—|-—|--— | BOI0 | BOI1 | .. | DU | U0 | U1 | .. | BOI0_U0 | .. | BOI1_U0 | .. | Un |---—|---—|-—|-—|-—|-—|-—|------—|-—|------—|-—|--— v v ^ ^ | | | | | +-----—uint32_t Begin---------—+ | | | +--------—uint32_t End--------------------------—+
BOI0, BOI1 ... are descriptions of operand bundles in thisUser's use list. These descriptions are installed and managed by this class, and they're all instances of OperandBundleUser<T>::BundleOpInfo.
DU is an additional descriptor installed byUser's 'operator new' to keep track of the 'BOI0 ... BOIN' co-allocation. OperandBundleUser does not access or modify DU in any way, it's an implementation detail private toUser.
The regularUse& vector for theUser starts at U0. The operand bundle uses are part of theUse& vector, just like normal uses. In the diagram above, the operand bundle uses start at BOI0_U0. Each instance ofBundleOpInfo has information about a contiguous set of uses constituting an operand bundle, and the total set of operand bundle uses themselves form a contiguous set of uses (i.e. there are no gaps between uses corresponding to individual operand bundles).
This class does not know the location of the set of operand bundle uses within the use list – that is decided by theUser using this class via the BeginIdx argument in populateBundleOperandInfos.
Currently operand bundle users with hung-off operands are not supported.
Definition at line2214 of fileInstrTypes.h.
Referencesllvm::User::getDescriptor(), andhasDescriptor().
Referenced bybundle_op_info_begin(),bundle_op_infos(),getBundleOperandsStartIndex(),getBundleOpInfoForOperand(),getNumOperandBundles(),getOperandBundleAt(),hasIdenticalOperandBundleSchema(), andprocessCall().
| inline |
Return the start of the list ofBundleOpInfo instances associated with this OperandBundleUser.
Definition at line2224 of fileInstrTypes.h.
Referencesbundle_op_info_begin().
| inline |
Return the end of the list ofBundleOpInfo instances associated with this OperandBundleUser.
Definition at line2231 of fileInstrTypes.h.
Referencesllvm::User::getDescriptor(), andhasDescriptor().
Referenced bybundle_op_info_end(),bundle_op_infos(),getBundleOperandsEndIndex(),getBundleOpInfoForOperand(),getNumOperandBundles(),hasIdenticalOperandBundleSchema(), andprocessCall().
| inline |
Return the end of the list ofBundleOpInfo instances associated with this OperandBundleUser.
Definition at line2241 of fileInstrTypes.h.
Referencesbundle_op_info_end().
| inline |
Return the range [bundle_op_info_begin
,bundle_op_info_end
).
Definition at line2247 of fileInstrTypes.h.
Referencesbundle_op_info_begin(),bundle_op_info_end(), andllvm::make_range().
Referenced bygetBundleOpInfoForOperand(), andpopulateBundleOperandInfos().
| inline |
Return the range [bundle_op_info_begin
,bundle_op_info_end
).
Definition at line2252 of fileInstrTypes.h.
Referencesbundle_op_info_begin(),bundle_op_info_end(), andllvm::make_range().
| inline |
Return true if the bundle operand at indexOpIdx
has the attributeA
.
Definition at line2108 of fileInstrTypes.h.
ReferencesA,getBundleOpInfoForOperand(), andoperandBundleFromBundleOpInfo().
Referenced bydataOperandHasImpliedAttr().
| inline |
Determine if the invoke cannot be duplicated.
Definition at line1929 of fileInstrTypes.h.
ReferenceshasFnAttr().
Referenced bycanSplitCallSite().
| inline |
Determine if the call cannot be tail merged.
Definition at line1933 of fileInstrTypes.h.
ReferenceshasFnAttr().
| inlinestatic |
Definition at line1195 of fileInstrTypes.h.
Referencesclassof().
| inlinestaticprotected |
Return the total number of values used inBundles
.
Definition at line2282 of fileInstrTypes.h.
ReferencesB, andllvm::Total.
Return the number of operand bundles with the tag Name attached to this instruction.
Definition at line2029 of fileInstrTypes.h.
ReferencesgetNumOperandBundles(),getOperandBundleAt(), andName.
Referenced bygetOperandBundle(),llvm::CallLowering::lowerCall(), andllvm::SelectionDAGBuilder::LowerCallTo().
Return the number of operand bundles with the tag ID attached to this instruction.
Definition at line2040 of fileInstrTypes.h.
ReferencesgetNumOperandBundles(), andgetOperandBundleAt().
| static |
Create a clone ofCB
with a different set of operand bundles and insert it beforeInsertPt
.
The returned call instruction is identicalCB
in every way except that the operand bundles for the new instruction are set to the operand bundles inBundles
.
Definition at line301 of fileInstructions.cpp.
Referencesllvm::CallInst::Create(),llvm::CallBrInst::Create(),llvm::InvokeInst::Create(),llvm::Instruction::getOpcode(), andllvm_unreachable.
Referenced byaddOperandBundle(),Create(),llvm::InlineFunction(),PropagateOperandBundles(),removeOperandBundle(), andRemovePreallocated().
| static |
Create a clone ofCB
with the operand bundle with the tag matchingBundle's
tag replaced with Bundle, and insert it beforeInsertPt
.
The returned call instruction is identicalCI
in every way except that the specified operand bundle has been replaced.
Definition at line315 of fileInstructions.cpp.
ReferencesCreate(),llvm::SmallVectorImpl< T >::emplace_back(),getNumOperandBundles(),getOperandBundleAt(), andllvm::OperandBundleDefT< InputTy >::getTag().
| inline |
data_operands_begin/data_operands_end - Return iterators iterating over the call / invoke argument list and bundle operands.
For invokes, this is the set of instruction operands except the invoke target and the two successor blocks; and for calls this is the set of instruction operands except the call target.
Definition at line1213 of fileInstrTypes.h.
Referencesllvm::User::op_begin().
Referenced bydata_operands_begin(),data_operands_empty(),data_operands_size(),data_ops(),getDataOperandNo(), andisDataOperand().
| inline |
Definition at line1214 of fileInstrTypes.h.
Referencesdata_operands_begin().
| inline |
Definition at line1231 of fileInstrTypes.h.
Referencesdata_operands_begin(), anddata_operands_end().
| inline |
Definition at line1217 of fileInstrTypes.h.
ReferencesgetNumSubclassExtraOperands(), andllvm::User::op_end().
Referenced byarg_end(),data_operands_empty(),data_operands_end(),data_operands_size(),data_ops(), andisDataOperand().
| inline |
Definition at line1222 of fileInstrTypes.h.
Referencesdata_operands_end().
| inline |
Definition at line1234 of fileInstrTypes.h.
Referencesdata_operands_begin(), anddata_operands_end().
| inline |
Definition at line1225 of fileInstrTypes.h.
Referencesdata_operands_begin(),data_operands_end(), andllvm::make_range().
| inline |
Definition at line1228 of fileInstrTypes.h.
Referencesdata_operands_begin(),data_operands_end(), andllvm::make_range().
| inline |
Return true if the data operand at indexi
has the attributeA
.
Data operands include call arguments and values used in operand bundles, but does not include the callee operand.
The indexi
is interpreted as
i
in [0, arg_size) -> argument number (i
)i
in [arg_size, data_operand_size) -> bundle operand at index (i
) in the operand list.
Definition at line1649 of fileInstrTypes.h.
Referencesarg_size(),assert(),bundleOperandHasAttr(),getBundleOperandsStartIndex(),getNumTotalBundleOperands(),hasOperandBundles(), andparamHasAttr().
Referenced bydeterminePointerAccessAttrs(),doesNotAccessMemory(),doesNotCapture(),onlyReadsMemory(), andonlyWritesMemory().
llvm::CallBase::DECLARE_TRANSPARENT_OPERAND_ACCESSORS | ( | Value | ) |
| inline |
Determine if the call should not perform indirect branch tracking.
Definition at line1922 of fileInstrTypes.h.
ReferenceshasFnAttr().
bool CallBase::doesNotAccessMemory | ( | ) | const |
Determine if the call does not access memory.
Determine if the function does not access memory.
Definition at line627 of fileInstructions.cpp.
Referencesllvm::MemoryEffectsBase< LocationEnum >::doesNotAccessMemory(), andgetMemoryEffects().
Definition at line1715 of fileInstrTypes.h.
ReferencesdataOperandHasImpliedAttr().
Referenced bydeterminePointerAccessAttrs(),isTrigLibCall(), andmarkTails().
Determine whether this data operand is not captured.
Definition at line1669 of fileInstrTypes.h.
Referencesarg_size(),dataOperandHasImpliedAttr(), andisByValArgument().
Referenced bydeterminePointerAccessAttrs().
| inline |
Determine if the call cannot return.
Definition at line1918 of fileInstrTypes.h.
ReferenceshasFnAttr().
| inline |
Determine if the call cannot unwind.
Definition at line1925 of fileInstrTypes.h.
ReferenceshasFnAttr().
Referenced byHandleCallsInBlockInlinedThroughInvoke(),llvm::InlineFunction(),isRemovableWrite(),isTrigLibCall(), andllvm::InstCombinerImpl::visitCallInst().
Definition at line1286 of fileInstrTypes.h.
Referencesarg_size(),assert(), andllvm::User::getOperand().
Referenced byAddAlignmentAssumptions(),addArgumentAttrsFromCallsites(),addIntrinsicToSummary(),llvm::SystemZTTIImpl::adjustInliningThreshold(),annotateDereferenceableBytes(),annotateNonNullNoUndefBasedOnAccess(),checkIfSupported(),llvm::CoroIdInst::clearPromise(),convertFSqrtDivIntoFMul(),convertStrToInt(),llvm::OpenMPIRBuilder::createTask(),llvm::OpenMPIRBuilder::createTeams(),destArrayCanBeWidened(),DoLowering(),llvm::OpenMPIRBuilder::emitTargetTask(),emitTargetTaskProxyFunction(),findAffectedValues(),llvm::findDevirtualizableCallsForTypeCheckedLoad(),llvm::findDevirtualizableCallsForTypeTest(),llvm::AMDGPULibCalls::fold(),foldCtpopPow2Test(),llvm::funcReturnsFirstArgOfCall(),llvm::GCStatepointInst::getActualCalledOperand(),llvm::CoroPromiseInst::getAlignment(),llvm::CoroAllocaAllocInst::getAlignment(),llvm::CoroAllocaGetInst::getAlloc(),llvm::CoroAllocaFreeInst::getAlloc(),llvm::AnyCoroIdRetconInst::getAllocFunction(),llvm::getAllocSize(),llvm::VAStartInst::getArgList(),llvm::VAEndInst::getArgList(),getArgOperandWithAttribute(),llvm::CoroAsyncContextDeallocInst::getAsyncContext(),llvm::CoroSuspendAsyncInst::getAsyncContextProjectionFunction(),llvm::CoroIdAsyncInst::getAsyncFunctionPointer(),llvm::CoroAsyncContextAllocInst::getAsyncFunctionPointer(),llvm::PseudoProbeInst::getAttributes(),llvm::CoroAwaitSuspendInst::getAwaiter(),llvm::GCRelocateInst::getBasePtrIndex(),llvm::InstrProfMCDCTVBitmapUpdate::getBitmapIndex(),getBranchWeight(),llvm::AbstractCallSite::getCallArgOperand(),llvm::AbstractCallSite::getCalledOperand(),llvm::InstrProfCallsite::getCallee(),llvm::CoroSuspendInst::getCoroSave(),llvm::CoroIdInst::getCoroutine(),llvm::CoroBeginInst::getCustomABI(),llvm::AnyCoroIdRetconInst::getDeallocFunction(),llvm::GCRelocateInst::getDerivedPtrIndex(),llvm::VACopyInst::getDest(),llvm::ConstrainedFPIntrinsic::getExceptionBehavior(),llvm::PseudoProbeInst::getFactor(),llvm::GCStatepointInst::getFlags(),llvm::MemoryLocation::getForDest(),llvm::MemoryLocation::getForSource(),llvm::CoroSubFnInst::getFrame(),llvm::CoroAwaitSuspendInst::getFrame(),llvm::CoroFreeInst::getFrame(),llvm::getFreedOperand(),llvm::PseudoProbeInst::getFuncGuid(),llvm::InstrProfInstBase::getHash(),llvm::GCStatepointInst::getID(),llvm::CoroBeginInst::getId(),llvm::InstrProfCntrInstBase::getIndex(),llvm::InstrProfValueProfileInst::getIndex(),llvm::PseudoProbeInst::getIndex(),getISDForVPIntrinsic(),KernelInfo::getKernelEnvironementGVFromKernelInitCB(),llvm::MemIntrinsicBase< Derived >::getLength(),llvm::MinMaxIntrinsic::getLHS(),llvm::CmpIntrinsic::getLHS(),llvm::BinaryOpIntrinsic::getLHS(),llvm::VPIntrinsic::getMaskParam(),llvm::InstrProfMCDCTVBitmapUpdate::getMCDCCondBitmapAddr(),llvm::CoroBeginInst::getMem(),llvm::VPIntrinsic::getMemoryDataParam(),llvm::VPIntrinsic::getMemoryPointerParam(),llvm::CoroSuspendAsyncInst::getMustTailCallFunction(),llvm::CoroAsyncEndInst::getMustTailCallFunction(),llvm::InstrProfInstBase::getNameValue(),llvm::InstrProfMCDCBitmapInstBase::getNumBitmapBits(),llvm::GCStatepointInst::getNumCallArgs(),llvm::InstrProfCntrInstBase::getNumCounters(),llvm::GCStatepointInst::getNumPatchBytes(),llvm::AArch64TTIImpl::getOrCreateResultFromMemIntrinsic(),llvm::VPCmpIntrinsic::getPredicate(),llvm::ConstrainedFPCmpIntrinsic::getPredicate(),llvm::CoroIdInst::getPromise(),llvm::AnyCoroIdRetconInst::getPrototype(),llvm::DbgAssignIntrinsic::getRawAddress(),llvm::DbgAssignIntrinsic::getRawAddressExpression(),llvm::DbgAssignIntrinsic::getRawAssignID(),llvm::MemIntrinsicBase< Derived >::getRawDest(),llvm::AtomicMemIntrinsic::getRawElementSizeInBytes(),llvm::DbgVariableIntrinsic::getRawExpression(),llvm::CoroSubFnInst::getRawIndex(),llvm::CoroIdInst::getRawInfo(),llvm::DbgLabelInst::getRawLabel(),llvm::DbgVariableIntrinsic::getRawLocation(),llvm::DbgVariableIntrinsic::getRawVariable(),llvm::AnyCoroEndInst::getResults(),llvm::CoroSuspendAsyncInst::getResumeFunction(),llvm::MinMaxIntrinsic::getRHS(),llvm::CmpIntrinsic::getRHS(),llvm::BinaryOpIntrinsic::getRHS(),llvm::ConstrainedFPIntrinsic::getRoundingMode(),llvm::CoroAllocaAllocInst::getSize(),llvm::VACopyInst::getSrc(),llvm::GCProjectionInst::getStatepoint(),llvm::InstrProfIncrementInst::getStep(),llvm::AnyCoroIdRetconInst::getStorage(),llvm::AnyCoroIdRetconInst::getStorageAlignment(),llvm::CoroIdAsyncInst::getStorageAlignment(),llvm::CoroIdAsyncInst::getStorageArgumentIndex(),llvm::CoroSuspendAsyncInst::getStorageArgumentIndex(),llvm::AnyCoroIdRetconInst::getStorageSize(),llvm::CoroIdAsyncInst::getStorageSize(),llvm::InstrProfValueProfileInst::getTargetValue(),llvm::SITargetLowering::getTgtMemIntrinsic(),llvm::AArch64TTIImpl::getTgtMemIntrinsic(),llvm::PPCTTIImpl::getTgtMemIntrinsic(),llvm::GCNTTIImpl::getTgtMemIntrinsic(),llvm::InstrProfValueProfileInst::getValueKind(),llvm::VPIntrinsic::getVectorLengthParam(),llvm::MemIntrinsic::getVolatileCst(),llvm::MemSetPatternIntrinsic::getVolatileCst(),llvm::RISCVTTIImpl::getVPLegalizationStrategy(),llvm::CoroAwaitSuspendInst::getWrapperFunction(),handleBrSelExpect(),handleGuaranteedWellDefinedOps(),handlePhiDef(),handleSwitchExpect(),llvm::AnyCoroEndInst::hasResults(),haveSameOperands(),llvm::InlineFunction(),InsertStackProtectors(),instCombineSVEPTest(),llvm::CoroSuspendInst::isFinal(),llvm::CoroPromiseInst::isFromPromise(),isKnownNonZeroFromOperator(),llvm::isLegalToPromote(),llvm::GCNTTIImpl::isReadRegisterSourceOfDivergence(),isReportingError(),llvm::GCProjectionInst::isTiedToInvoke(),llvm::AnyCoroEndInst::isUnwind(),lowerExpectIntrinsic(),llvm::IntrinsicLowering::LowerIntrinsicCall(),llvm::lowerObjectSizeCall(),llvm::IntrinsicLowering::LowerToByteSwap(),llvm::lowerUnaryVectorIntrinsicAsLoop(),llvm::makeGuardControlFlowExplicit(),memChrToCharCompare(),mergeAttributesAndFlags(),OptimizeAwayTrappingUsesOfValue(),optimizeCallInst(),optimizeDoubleFP(),OptimizeEmptyGlobalAtExitDtors(),optimizeNaN(),optimizeSymmetricCall(),llvm::promoteCall(),RemovePreallocated(),ReplaceFPIntrinsicWithCall(),replacePrepare(),replaceUnaryCall(),scalarizeMaskedCompressStore(),scalarizeMaskedExpandLoad(),scalarizeMaskedGather(),scalarizeMaskedLoad(),scalarizeMaskedScatter(),scalarizeMaskedStore(),scalarizeMaskedVectorHistogram(),llvm::CoroIdInst::setCoroutineSelf(),setInfoSVEStN(),llvm::LoopVectorizationCostModel::setVectorizedCallDecision(),stripDebugDeclareImpl(),llvm::JumpThreadingPass::threadGuard(),tryToMoveFreeBeforeNullTest(),tryWidenGlobalArraysUsedByMemcpy(),turnGuardIntoBranch(),unwrapMAVOp(),upgradeAbs(),upgradeAMDGCNIntrinsicCall(),llvm::UpgradeARCRuntime(),upgradeARMIntrinsicCall(),upgradeAVX512MaskToSelect(),upgradeDbgIntrinsicToDbgRecord(),llvm::UpgradeIntrinsicCall(),upgradeMaskedCompare(),upgradeMaskedMove(),upgradeMaskToInt(),upgradeNVVMIntrinsicCall(),upgradePMULDQ(),upgradeX86ConcatShift(),upgradeX86IntrinsicCall(),upgradeX86MaskedShift(),upgradeX86Rotate(),upgradeX86vpcom(),upgradeX86VPERMT2Intrinsics(),llvm::ObjectSizeOffsetEvaluator::visitCallBase(),llvm::InstCombinerImpl::visitCallInst(),widenDestArray(), andworkshareLoopTargetCallback().
Given a use for a arg operand, get the arg operand number that corresponds to it.
Definition at line1317 of fileInstrTypes.h.
Referencesarg_begin(),assert(), andisArgOperand().
Referenced byllvm::AbstractCallSite::AbstractCallSite(),adjustInliningThresholdUsingCallee(),getArgOperandNo(),llvm::AbstractCallSite::isCallee(), andrunIPSCCP().
| inline |
Given a value use iterator, return the arg operand number corresponding to it.
Iterator must actually correspond to a data operand.
Definition at line1324 of fileInstrTypes.h.
ReferencesgetArgOperandNo().
Definition at line1301 of fileInstrTypes.h.
Referencesarg_size(),assert(), andllvm::User::getOperandUse().
Wrappers for getting theUse
of a call argument.
Definition at line1297 of fileInstrTypes.h.
Referencesarg_size(),assert(), andllvm::User::getOperandUse().
Referenced byllvm::IRPosition::callsite_argument(),llvm::MemIntrinsicBase< Derived >::getLengthUse(), andllvm::MemIntrinsicBase< Derived >::getRawDestUse().
Value * CallBase::getArgOperandWithAttribute | ( | Attribute::AttrKind | Kind | ) | const |
If one of the arguments has the specified attribute, returns its operand value.
Otherwise, return nullptr.
Definition at line396 of fileInstructions.cpp.
ReferencesAttrs,F,llvm::AttributeList::FirstArgIndex,getArgOperand(),getCalledFunction(), andllvm::AttributeList::hasAttrSomewhere().
Referenced byllvm::getFreedOperand(),llvm::getReallocatedOperand(), andgetReturnedArgOperand().
| inline |
Get the attribute of a given kind at a position.
Definition at line1595 of fileInstrTypes.h.
Referencesllvm::AttributeList::getAttributeAtIndex(), andgetAttributes().
Get the attribute of a given kind at a position.
Definition at line1600 of fileInstrTypes.h.
Referencesllvm::AttributeList::getAttributeAtIndex(), andgetAttributes().
| inline |
Return the attributes for this call.
Definition at line1417 of fileInstrTypes.h.
ReferencesAttrs.
Referenced byllvm::changeToInvokeAndSplitBasicBlock(),llvm::CallBrInst::Create(),llvm::CallInst::Create(),doPromotion(),llvm::GVNExpression::CallExpression::equals(),expandAtan2Intrinsic(),expandExpIntrinsic(),expandLogIntrinsic(),expandPowIntrinsic(),getAttributeAtIndex(),getFnAttr(),getMemoryEffects(),getParamAttr(),getParamAttributes(),getRetAttributes(),llvm::InlineFunction(),llvm::isLegalToPromote(),lowerAwaitSuspend(),llvm::CallLowering::lowerCall(),makeStatepointExplicitImpl(),optimizeCallInst(),processCall(),processCallSite(),llvm::promoteCall(),RemoveAttribute(),llvm::SMEAttrs::SMEAttrs(),tryIntersectAttributes(),tryToMoveFreeBeforeNullTest(), andllvm::UpgradeIntrinsicCall().
| inline |
Return the index of the last bundle operand in theUse array.
Definition at line1980 of fileInstrTypes.h.
Referencesassert(),bundle_op_info_end(),llvm::CallBase::BundleOpInfo::End, andhasOperandBundles().
Referenced bygetNumTotalBundleOperands(), andisBundleOperand().
| inline |
Return the index of the first bundle operand in theUse array.
Definition at line1974 of fileInstrTypes.h.
Referencesassert(),llvm::CallBase::BundleOpInfo::Begin,bundle_op_info_begin(), andhasOperandBundles().
Referenced bydataOperandHasImpliedAttr(),getNumTotalBundleOperands(),getSameOpcode(), andisBundleOperand().
CallBase::BundleOpInfo & CallBase::getBundleOpInfoForOperand | ( | unsigned | OpIdx | ) |
Return theBundleOpInfo for the operand at index OpIdx.
It is an error to call this with an OpIdx that does not correspond to an bundle operand.
When there isn't many bundles, we do a simple linear search. Else fallback to a binary-search that use the fact that bundles usually have similar number of argument to get faster convergence.
We need a decimal number below and to prevent using floating point numbers we use an intergal value multiplied by this constant.
Definition at line515 of fileInstructions.cpp.
Referencesarg_size(),assert(),llvm::CallBase::BundleOpInfo::Begin,bundle_op_info_begin(),bundle_op_info_end(),bundle_op_infos(),llvm::CallBase::BundleOpInfo::End,End, andllvm_unreachable.
Referenced bybundleOperandHasAttr(),getBundleOpInfoForOperand(), andgetOperandBundleForOperand().
| inline |
Definition at line2276 of fileInstrTypes.h.
ReferencesgetBundleOpInfoForOperand().
| inline |
Returns the function called, or null if this is an indirect function invocation or the function signature does not match the call signature.
Definition at line1341 of fileInstrTypes.h.
ReferencesF,getCalledOperand(), andgetFunctionType().
Referenced byllvm::AbstractCallSite::AbstractCallSite(),AddAliasScopeMetadata(),AddAlignmentAssumptions(),addArgumentAttrsFromCallsites(),addIntrinsicToSummary(),addMappingsFromTLI(),addNoRecurseAttrs(),AddParamAndFnBasicAttributes(),AddReturnAttributes(),addVariantDeclaration(),llvm::SystemZTTIImpl::adjustInliningThreshold(),callInstIsMemcpy(),llvm::InstrProfCallsite::canInstrumentCallsite(),llvm::CoroAwaitSuspendInst::classof(),llvm::OpenMPIRBuilder::createParallel(),createSCCNodeSet(),determinePointerAccessAttrs(),doCallSiteSplitting(),DoLowering(),doPromotion(),emitTargetTaskProxyFunction(),llvm::findDevirtualizableCallsForTypeCheckedLoad(),llvm::findDevirtualizableCallsForTypeTest(),llvm::AMDGPULibCalls::fold(),llvm::InlineAdvisor::getAdvice(),llvm::MLInlineAdvisor::getAdviceImpl(),llvm::ReplayInlineAdvisor::getAdviceImpl(),llvm::objcarc::GetARCInstKind(),getArgOperandWithAttribute(),llvm::AbstractCallSite::getCallbackUses(),llvm::GCNTTIImpl::getCallerAllocaCost(),getDefaultInlineAdvice(),llvm::getIntrinsicForCallSite(),getIntrinsicID(),llvm::IntrinsicInst::getIntrinsicID(),llvm::TargetLibraryInfo::getLibFunc(),llvm::InlineAdvisor::getMandatoryKind(),llvm::MDNode::getMergedProfMetadata(),getParamByRefType(),getParamByValType(),getParamInAllocaType(),getParamNoFPClass(),getParamPreallocatedType(),getParamStructRetType(),getRetAlign(),getRetAttr(),getRetDereferenceableBytes(),getRetDereferenceableOrNullBytes(),getRetNoFPClass(),getSameOpcode(),llvm::LoopVectorizationCostModel::getVectorCallCost(),llvm::LoopVectorizationCostModel::getVectorIntrinsicCost(),llvm::VFDatabase::getVectorizedFunction(),handleBrSelExpect(),HandleCallsInBlockInlinedThroughInvoke(),handlePhiDef(),handleSwitchExpect(),llvm::hasAssumption(),llvm::InlineFunction(),InstrBreaksNoFree(),InstrBreaksNonConvergent(),InstrBreaksNoSync(),llvm::IntrinsicCostAttributes::IntrinsicCostAttributes(),isFunctionMallocLike(),isIntrinsicOrLFToBeTailCalled(),llvm::isLegalToPromote(),isReturnNonNull(),isSMEABIRoutineCall(),llvm::isTLIScalarize(),lowerAwaitSuspend(),llvm::NVPTXTargetLowering::LowerCall(),lowerExpectIntrinsic(),llvm::IntrinsicLowering::LowerIntrinsicCall(),llvm::maybeMarkSanitizerLibraryCallNoBuiltin(),modifyIntrinsicCall(),llvm::FortifiedLibCallSimplifier::optimizeCall(),llvm::LibCallSimplifier::optimizeCall(),optimizeDoubleFP(),optimizeSymmetricCall(),paramHasAttr(),llvm::SITargetLowering::passSpecialInputs(),llvm::promoteCall(),llvm::SCCPInstVisitor::resolvedUndef(),restoreMutatedType(),llvm::AMDGPULowerKernelAttributesPass::run(),llvm::InlineCostAnnotationPrinterPass::run(),runCGProfilePass(),llvm::IRSimilarity::IRInstructionData::setCalleeName(),llvm::LoopVectorizationCostModel::setVectorizedCallDecision(),shouldBeDeferred(),shouldCheckArgs(),llvm::shouldInline(),llvm::SMEAttrs::SMEAttrs(),llvm::PPCTargetLowering::supportsTailCallFor(),trackInlinedStores(),llvm::tryPromoteCall(),llvm::SCCPSolver::tryToReplaceWithConstant(),tryWidenGlobalArraysUsedByMemcpy(),llvm::UpgradeARCRuntime(),llvm::UpgradeIntrinsicCall(),llvm::AMDGPULibCalls::useNative(), andllvm::IRSimilarity::IRInstructionMapper::InstructionClassification::visitCallInst().
| inline |
Definition at line1334 of fileInstrTypes.h.
Referenced bycanParameterizeCallOperand(),llvm::changeToInvokeAndSplitBasicBlock(),llvm::Attributor::checkForAllCallees(),llvm::CallBrInst::Create(),llvm::CallInst::Create(),llvm::diagnoseDontCall(),llvm::ARMTargetLowering::ExpandInlineAsm(),llvm::X86TargetLowering::ExpandInlineAsm(),getCalledFunction(),llvm::AbstractCallSite::getCalledOperand(),llvm::getMaybeBitcastedCallee(),getMemoryEffects(),handleGuaranteedWellDefinedOps(),llvm::InlineFunction(),isIndirectCall(),isInlineAsm(),llvm::FastISel::lowerCall(),llvm::CallLowering::lowerCall(),llvm::SelectionDAGBuilder::LowerCallSiteWithPtrAuthBundle(),OptimizeAwayTrappingUsesOfValue(),prepareDescriptorIndirectCall(),simplifySuspendPoint(),llvm::Attributor::translateArgumentToCallSiteContent(),llvm::PGOIndirectCallVisitor::tryGetVTableInstruction(),llvm::tryPromoteCall(),llvm::UpgradeIntrinsicCall(),llvm::versionCallSite(),llvm::Interpreter::visitCallBase(), andllvm::InstCombinerImpl::visitCallInst().
| inline |
Definition at line1337 of fileInstrTypes.h.
Definition at line1336 of fileInstrTypes.h.
Referenced byisCallee(), andisCalleeOperand().
Function * CallBase::getCaller | ( | ) |
Helper to get the caller (the parent function).
Definition at line327 of fileInstructions.cpp.
Referencesllvm::ilist_detail::node_parent_access< NodeTy, ParentTy >::getParent().
Referenced byAddAlignmentAssumptions(),annotateDereferenceableBytes(),annotateNonNullNoUndefBasedOnAccess(),llvm::CtxProfAnalysis::collectIndirectCallPromotionList(),doPromotion(),llvm::InlineAdvisor::getAdvice(),llvm::MLInlineAdvisor::getAdviceImpl(),llvm::ReplayInlineAdvisor::getAdviceImpl(),getCaller(),llvm::InlineAdvisor::getCallerORE(),getDefaultInlineAdvice(),llvm::InlineFunction(),isColdCallSite(),llvm::ProfileSummaryInfo::isColdCallSite(),isReturnNonNull(),llvm::InlineCostAnnotationPrinterPass::run(),llvm::shouldInline(),llvm::PPCTargetLowering::supportsTailCallFor(), andllvm::tryPromoteCall().
Definition at line1361 of fileInstrTypes.h.
ReferencesgetCaller().
| inline |
Definition at line1399 of fileInstrTypes.h.
Referenced byadjustInliningThresholdUsingCallee(),llvm::changeToInvokeAndSplitBasicBlock(),llvm::CallBrInst::Create(),llvm::CallInst::Create(),doPromotion(),llvm::InlineFunction(),llvm::AMDGPU::isArgPassedInSGPR(),llvm::TargetLibraryInfoImpl::isCallingConvCCompatible(),llvm::CallLowering::lowerCall(),llvm::FastISel::lowerCallTo(),llvm::makeGuardControlFlowExplicit(),processCall(),llvm::PPCTargetLowering::supportsTailCallFor(), andllvm::IRSimilarity::IRInstructionMapper::InstructionClassification::visitCallInst().
| inline |
Return the convergence control token for this call, if it exists.
Definition at line1183 of fileInstrTypes.h.
ReferencesgetOperandBundle(), andllvm::LLVMContext::OB_convergencectrl.
Given a use for a data operand, get the data operand number that corresponds to it.
Definition at line1255 of fileInstrTypes.h.
Referencesassert(),data_operands_begin(), andisDataOperand().
| inline |
Given a value use iterator, return the data operand corresponding to it.
Iterator must actually correspond to a data operand.
Definition at line1249 of fileInstrTypes.h.
ReferencesgetDataOperandNo().
Referenced bydeterminePointerAccessAttrs(), andgetDataOperandNo().
| inline |
Get the attribute of a given kind for the function.
Definition at line1613 of fileInstrTypes.h.
ReferencesA,getAttributes(), andllvm::AttributeList::getFnAttr().
Get the attribute of a given kind for the function.
Definition at line1605 of fileInstrTypes.h.
ReferencesgetAttributes(),llvm::AttributeList::getFnAttr(), andllvm::Attribute::isValid().
Referenced bygetAllocationSize(),llvm::getAssumptions(),llvm::getStringFnAttrAsInt(),llvm::VFABI::getVectorVariantNames(), andllvm::hasAssumption().
| inline |
Definition at line1199 of fileInstrTypes.h.
ReferencesFTy.
Referenced byaddVariantDeclaration(),llvm::changeToInvokeAndSplitBasicBlock(),llvm::CallBrInst::Create(),llvm::CallInst::Create(),llvm::AMDGPULibCalls::fold(),getCalledFunction(),getVectorCallCosts(),llvm::VFDatabase::getVectorizedFunction(),llvm::VFABI::getVectorVariantNames(),llvm::objcarc::hasAttachedCallOpBundle(),llvm::InlineFunction(),llvm::TargetLibraryInfoImpl::isCallingConvCCompatible(),llvm::FastISel::lowerCall(),llvm::CallLowering::lowerCall(),llvm::HexagonTargetLowering::LowerCall(),llvm::SelectionDAGBuilder::LowerCallTo(),llvm::FastISel::lowerCallTo(),lowerFunnelShifts(),promoteArguments(),llvm::promoteCall(),llvm::VFABI::setVectorVariantNames(),shouldConvertToIndirectCall(), andllvm::UpgradeIntrinsicCall().
Intrinsic::ID CallBase::getIntrinsicID | ( | ) | const |
Returns the intrinsic ID of the intrinsic called orIntrinsic::not_intrinsic if the called function is not an intrinsic, or if this is an indirect call.
Definition at line356 of fileInstructions.cpp.
ReferencesF,getCalledFunction(), andllvm::Intrinsic::not_intrinsic.
Referenced byllvm::objcarc::BundledRetainClaimRVs::eraseInst(),hasClobberingOperandBundles(),hasReadingOperandBundles(),llvm::AANoSync::isAlignedBarrier(),isKnownIntegral(),llvm::CallInst::isNonContinuableTrap(),llvm::lowerUnaryVectorIntrinsicAsLoop(),processCallSite(),llvm::InstCombinerImpl::SimplifyDemandedUseFPClass(),upgradeARMIntrinsicCall(), andllvm::InstCombinerImpl::visitCallInst().
MemoryEffects CallBase::getMemoryEffects | ( | ) | const |
Definition at line607 of fileInstructions.cpp.
ReferencesgetAttributes(),getCalledOperand(),llvm::AttributeList::getMemoryEffects(),hasClobberingOperandBundles(),hasOperandBundles(),hasReadingOperandBundles(),llvm::MemoryEffectsBase< LocationEnum >::readOnly(), andllvm::MemoryEffectsBase< LocationEnum >::writeOnly().
Referenced bydeterminePointerAccessAttrs(),doesNotAccessMemory(),onlyAccessesArgMemory(),onlyAccessesInaccessibleMemOrArgMem(),onlyAccessesInaccessibleMemory(),onlyReadsMemory(),onlyWritesMemory(),setOnlyAccessesArgMemory(),setOnlyAccessesInaccessibleMemOrArgMem(),setOnlyAccessesInaccessibleMemory(),setOnlyReadsMemory(), andsetOnlyWritesMemory().
| inline |
Return the number of operand bundles associated with thisUser.
Definition at line1966 of fileInstrTypes.h.
Referencesbundle_op_info_begin(), andbundle_op_info_end().
Referenced byllvm::CallInst::cloneImpl(),llvm::InvokeInst::cloneImpl(),llvm::CallBrInst::cloneImpl(),countOperandBundlesOfType(),Create(),findAffectedValues(),getOperandBundle(),getOperandBundleAt(),getOperandBundlesAsDefs(),hasIdenticalOperandBundleSchema(),hasOperandBundles(),hasOperandBundlesOtherThan(),llvm::InlineFunction(), andremoveOperandBundle().
| inlineprotected |
Definition at line1137 of fileInstrTypes.h.
ReferencesgetNumSubclassExtraOperandsDynamic(),llvm::Instruction::getOpcode(), andllvm_unreachable.
Referenced bydata_operands_end().
| protected |
Get the number of extra operands for instructions that don't have a fixed number of extra operands.
Definition at line329 of fileInstructions.cpp.
Referencesassert(), andllvm::Instruction::getOpcode().
Referenced bygetNumSubclassExtraOperands().
| inline |
Return the total number operands (not operand bundles) used by every operand bundle in this OperandBundleUser.
Definition at line2010 of fileInstrTypes.h.
Referencesassert(),End,getBundleOperandsEndIndex(),getBundleOperandsStartIndex(), andhasOperandBundles().
Referenced byarg_end(),dataOperandHasImpliedAttr(),llvm::CallBrInst::getIndirectDestLabel(), andllvm::CallBrInst::getIndirectDestLabelUse().
| inline |
Return an operand bundle by name, if present.
It is an error to call this for operand bundle types that may have multiple instances of them on the same instruction.
Definition at line2053 of fileInstrTypes.h.
Referencesassert(),countOperandBundlesOfType(),getNumOperandBundles(),getOperandBundleAt(), andName.
Referenced byaddOperandBundle(),canParameterizeCallOperand(),llvm::GCStatepointInst::deopt_begin(),llvm::GCStatepointInst::deopt_end(),llvm::GCStatepointInst::gc_live_begin(),llvm::GCStatepointInst::gc_live_end(),llvm::GCStatepointInst::gc_transition_args_begin(),llvm::GCStatepointInst::gc_transition_args_end(),llvm::objcarc::getAttachedARCFunction(),getConvergenceControlToken(),HandleCallsInBlockInlinedThroughInvoke(),llvm::objcarc::hasAttachedCallOpBundle(),hasDeoptState(),llvm::InlineFunction(),llvm::CallLowering::lowerCall(),llvm::SelectionDAGBuilder::LowerCallSiteWithPtrAuthBundle(),llvm::SelectionDAGBuilder::LowerCallTo(),llvm::makeGuardControlFlowExplicit(),processCallSite(), andllvm::SCCPSolver::tryToReplaceWithConstant().
| inline |
Return an operand bundle by tag ID, if present.
It is an error to call this for operand bundle types that may have multiple instances of them on the same instruction.
Definition at line2069 of fileInstrTypes.h.
Referencesassert(),countOperandBundlesOfType(),getNumOperandBundles(), andgetOperandBundleAt().
| inline |
Return the operand bundle at a specific index.
Definition at line2022 of fileInstrTypes.h.
Referencesassert(),bundle_op_info_begin(),getNumOperandBundles(),Index, andoperandBundleFromBundleOpInfo().
Referenced bycountOperandBundlesOfType(),Create(),findAffectedValues(),getOperandBundle(),getOperandBundlesAsDefs(),hasOperandBundlesOtherThan(),llvm::InlineFunction(), andremoveOperandBundle().
| inline |
Return the operand bundle for the operand at index OpIdx.
It is an error to call this with an OpIdx that does not correspond to an bundle operand.
Definition at line2094 of fileInstrTypes.h.
ReferencesgetBundleOpInfoForOperand(), andoperandBundleFromBundleOpInfo().
Referenced byisOperandBundleOfType().
void CallBase::getOperandBundlesAsDefs | ( | SmallVectorImpl<OperandBundleDef > & | Defs | ) | const |
Return the list of operand bundles attached to this instruction as a vector of OperandBundleDefs.
This function copies the OperandBundeUse instances associated with this OperandBundleUser to a vector of OperandBundleDefs. Note: OperandBundeUses and OperandBundleDefs are non-triviallydifferent representations of operand bundles (see documentation above).
Definition at line483 of fileInstructions.cpp.
Referencesllvm::SmallVectorImpl< T >::emplace_back(),getNumOperandBundles(), andgetOperandBundleAt().
Referenced byaddOperandBundle(),llvm::changeToInvokeAndSplitBasicBlock(),doPromotion(),llvm::InlineFunction(),llvm::FortifiedLibCallSimplifier::optimizeCall(),llvm::LibCallSimplifier::optimizeCall(), andRemovePreallocated().
| inline |
Extract the alignment for a call or parameter (0=unknown).
Definition at line1748 of fileInstrTypes.h.
ReferencesAttrs, andllvm::AttributeList::getParamAlignment().
Referenced byllvm::MemIntrinsicBase< Derived >::getDestAlign(),llvm::MemIntrinsicBase< Derived >::getDestAlignment(),llvm::VPIntrinsic::getPointerAlignment(),scalarizeMaskedCompressStore(), andscalarizeMaskedExpandLoad().
| inline |
Get the attribute of a given kind from a given arg.
Definition at line1621 of fileInstrTypes.h.
ReferencesA,arg_size(),assert(),getAttributes(), andllvm::AttributeList::getParamAttr().
Referenced byAddParamAndFnBasicAttributes().
Get the attribute of a given kind from a given arg.
Definition at line1630 of fileInstrTypes.h.
ReferencesA,arg_size(),assert(),getAttributes(), andllvm::AttributeList::getParamAttr().
| inline |
Return the param attributes for this call.
Definition at line1428 of fileInstrTypes.h.
ReferencesgetAttributes(), andllvm::AttributeList::getParamAttrs().
Referenced bymergeAttributesAndFlags().
Extract the byref type for a call or parameter.
Definition at line1757 of fileInstrTypes.h.
ReferencesAttrs,F,getCalledFunction(), andllvm::AttributeList::getParamByRefType().
Extract the byval type for a call or parameter.
Definition at line1766 of fileInstrTypes.h.
ReferencesAttrs,F,getCalledFunction(), andllvm::AttributeList::getParamByValType().
Referenced byllvm::InlineFunction().
Extract the number of dereferenceable bytes for a call or parameter (0=unknown).
Definition at line1819 of fileInstrTypes.h.
ReferencesAttrs, andllvm::AttributeList::getParamDereferenceableBytes().
Referenced byannotateDereferenceableBytes().
Extract the number of dereferenceable_or_null bytes for a parameter (0=unknown).
Definition at line1837 of fileInstrTypes.h.
ReferencesAttrs, andllvm::AttributeList::getParamDereferenceableOrNullBytes().
Referenced byannotateDereferenceableBytes().
Extract the elementtype type for a parameter.
Note that elementtype() can only be applied to call arguments, not function declaration parameters.
Definition at line1804 of fileInstrTypes.h.
ReferencesAttrs, andllvm::AttributeList::getParamElementType().
Referenced byllvm::GCStatepointInst::getActualReturnType().
Extract the inalloca type for a call or parameter.
Definition at line1784 of fileInstrTypes.h.
ReferencesAttrs,F,getCalledFunction(), andllvm::AttributeList::getParamInAllocaType().
FPClassTest CallBase::getParamNoFPClass | ( | unsigned | i | ) | const |
Extract a test mask for disallowed floating-point value classes for the parameter.
Definition at line370 of fileInstructions.cpp.
ReferencesAttrs,F,getCalledFunction(), andllvm::AttributeList::getParamNoFPClass().
Extract the preallocated type for a call or parameter.
Definition at line1775 of fileInstrTypes.h.
ReferencesAttrs,F,getCalledFunction(), andllvm::AttributeList::getParamPreallocatedType().
| inline |
Definition at line1752 of fileInstrTypes.h.
ReferencesAttrs, andllvm::AttributeList::getParamStackAlignment().
Extract the sret type for a call or parameter.
Definition at line1793 of fileInstrTypes.h.
ReferencesAttrs,F,getCalledFunction(), andllvm::AttributeList::getParamStructRetType().
std::optional<ConstantRange > CallBase::getRange | ( | ) | const |
If this return value has a range attribute, return the value range of the argument.
Otherwise, std::nullopt is returned.
Definition at line378 of fileInstructions.cpp.
Referencesllvm::Attribute::getRange(),getRetAttr(), andllvm::Attribute::isValid().
Referenced byIdentifyValidPoisonGeneratingAttributes().
| inline |
Extract the alignment of the return value.
Definition at line1739 of fileInstrTypes.h.
ReferencesAttrs,F,getCalledFunction(), andllvm::AttributeList::getRetAlignment().
Referenced byIdentifyValidPoisonGeneratingAttributes(),llvm::CallLowering::lowerCall(), andllvm::InstCombinerImpl::visitCallInst().
| inline |
Return the attribute for the given attribute kind for the return value.
Definition at line1580 of fileInstrTypes.h.
ReferencesAttrs,F,getCalledFunction(),llvm::AttributeList::getRetAttr(), andRetAttr.
Referenced bygetRange().
| inline |
Return the return attributes for this call.
Definition at line1423 of fileInstrTypes.h.
ReferencesgetAttributes(), andllvm::AttributeList::getRetAttrs().
Referenced byllvm::InlineFunction(), andmergeAttributesAndFlags().
| inline |
Extract the number of dereferenceable bytes for a call or parameter (0=unknown).
Definition at line1810 of fileInstrTypes.h.
ReferencesAttrs,F,getCalledFunction(), andllvm::AttributeList::getRetDereferenceableBytes().
Referenced byIdentifyValidUBGeneratingAttributes(), andisReturnNonNull().
| inline |
Extract the number of dereferenceable_or_null bytes for a call (0=unknown).
Definition at line1825 of fileInstrTypes.h.
ReferencesAttrs,F,getCalledFunction(), andllvm::AttributeList::getRetDereferenceableOrNullBytes().
Referenced byIdentifyValidUBGeneratingAttributes().
FPClassTest CallBase::getRetNoFPClass | ( | ) | const |
Extract a test mask for disallowed floating-point value classes for the return value.
Definition at line362 of fileInstructions.cpp.
ReferencesAttrs,F,getCalledFunction(), andllvm::AttributeList::getRetNoFPClass().
| inline |
If one of the arguments has the 'returned' attribute, returns its operand value.
Otherwise, return nullptr.
Definition at line1865 of fileInstrTypes.h.
ReferencesgetArgOperandWithAttribute().
Returns true if this CallSite passes the given Value* as an argument to the called function.
Definition at line1330 of fileInstrTypes.h.
Referencesargs(), andllvm::is_contained().
| inline |
Determine if any call argument is an aggregate passed by value.
Definition at line1952 of fileInstrTypes.h.
ReferencesAttrs, andllvm::AttributeList::hasAttrSomewhere().
bool CallBase::hasClobberingOperandBundles | ( | ) | const |
Return true if this operand bundle user has operand bundles that may write to the heap.
Definition at line600 of fileInstructions.cpp.
ReferencesgetIntrinsicID(),hasOperandBundlesOtherThan(),llvm::LLVMContext::OB_deopt,llvm::LLVMContext::OB_funclet,llvm::LLVMContext::OB_kcfi, andllvm::LLVMContext::OB_ptrauth.
Referenced bygetMemoryEffects(), andparamHasAttr().
| inline |
Return true if the call has deopt state bundle.
Definition at line2266 of fileInstrTypes.h.
ReferencesgetOperandBundle(), andllvm::LLVMContext::OB_deopt.
| inlineprotected |
Definition at line1135 of fileInstrTypes.h.
Referencesllvm::Value::HasDescriptor.
Referenced bybundle_op_info_begin(), andbundle_op_info_end().
| inline |
Determine whether this call has the given attribute.
If it does not then determine if the called function has the attribute, but only if the attribute is allowed for the call.
Definition at line1451 of fileInstrTypes.h.
Referencesassert().
Referenced byallPathsGoThroughCold(),cannotDuplicate(),cannotMerge(),llvm::CallInst::canReturnTwice(),doesNoCfCheck(),doesNotReturn(),doesNotThrow(),InstrBreaksNoFree(),InstrBreaksNoSync(),instructionDoesNotReturn(),isConvergent(),isNoInline(),llvm::CallInst::isNonContinuableTrap(),isStrictFP(), andllvm::SITargetLowering::passSpecialInputs().
Determine whether this call has the given attribute.
If it does not then determine if the called function has the attribute, but only if the attribute is allowed for the call.
Definition at line1460 of fileInstrTypes.h.
Return true ifOther
has the same sequence of operand bundle tags with the same number of operands on each one of them as this OperandBundleUser.
Definition at line2117 of fileInstrTypes.h.
Referencesbundle_op_info_begin(),bundle_op_info_end(),getNumOperandBundles(), andllvm::Other.
| inline |
Determine if there are is an inalloca argument.
Only the last argument can have the inalloca attribute.
Definition at line1709 of fileInstrTypes.h.
Referencesarg_empty(),arg_size(), andparamHasAttr().
| inline |
Return true if thisUser has any operand bundles.
Definition at line1971 of fileInstrTypes.h.
ReferencesgetNumOperandBundles().
Referenced byllvm::CallInst::cloneImpl(),llvm::InvokeInst::cloneImpl(),llvm::CallBrInst::cloneImpl(),dataOperandHasImpliedAttr(),getBundleOperandsEndIndex(),getBundleOperandsStartIndex(),llvm::MemoryLocation::getForDest(),getMemoryEffects(),getNumTotalBundleOperands(),getSameOpcode(),llvm::InlineFunction(), andisBundleOperand().
Return true if this operand bundle user contains operand bundles with tags other than those specified inIDs
.
Definition at line2127 of fileInstrTypes.h.
ReferencesgetNumOperandBundles(),getOperandBundleAt(),llvm::OperandBundleUse::getTagID(), andllvm::is_contained().
Referenced byhasClobberingOperandBundles(),hasReadingOperandBundles(), andmarkTails().
bool CallBase::hasReadingOperandBundles | ( | ) | const |
Return true if this operand bundle user has operand bundles that may read from the heap.
Definition at line591 of fileInstructions.cpp.
ReferencesgetIntrinsicID(),hasOperandBundlesOtherThan(),llvm::LLVMContext::OB_kcfi, andllvm::LLVMContext::OB_ptrauth.
Referenced bygetMemoryEffects(), andparamHasAttr().
| inline |
Determine whether the return value has the given attribute.
Definition at line1573 of fileInstrTypes.h.
Referenced byAddReturnAttributes(),IdentifyValidPoisonGeneratingAttributes(),IdentifyValidUBGeneratingAttributes(),isFunctionMallocLike(),isReturnNonNull(), andllvm::InstCombinerImpl::visitCallInst().
Determine whether the return value has the given attribute.
Definition at line1577 of fileInstrTypes.h.
| inline |
Determine if the call returns a structure through first pointer argument.
Definition at line1943 of fileInstrTypes.h.
Referencesarg_empty(), andparamHasAttr().
| protecteddelete |
| protected |
Definition at line1082 of fileInstruction.cpp.
Definition at line1306 of fileInstrTypes.h.
Referencesarg_begin(),arg_end(), andassert().
Referenced bydeterminePointerAccessAttrs(),getArgOperandNo(), andisArgOperand().
| inline |
Definition at line1311 of fileInstrTypes.h.
ReferencesisArgOperand().
Returns true if the use is a bundle operand.
Definition at line1999 of fileInstrTypes.h.
Referencesassert(),hasOperandBundles(),isBundleOperand(), andllvm::User::op_begin().
Return true if the operand at indexIdx
is a bundle operand.
Definition at line1986 of fileInstrTypes.h.
ReferencesgetBundleOperandsEndIndex(),getBundleOperandsStartIndex(),hasOperandBundles(), andIdx.
Referenced byisBundleOperand(), andisOperandBundleOfType().
| inline |
Definition at line2004 of fileInstrTypes.h.
ReferencesisBundleOperand().
Determine whether this argument is passed by value.
Definition at line1679 of fileInstrTypes.h.
ReferencesparamHasAttr().
Referenced bydoesNotCapture(),llvm::InlineFunction(), andonlyReadsMemory().
Determine whether thisUse is the callee operand'sUse.
Definition at line1357 of fileInstrTypes.h.
ReferencesgetCalledOperandUse().
| inline |
Determine whether the passed iterator points to the callee operand'sUse.
Definition at line1352 of fileInstrTypes.h.
ReferencesisCallee().
Referenced byllvm::AbstractCallSite::AbstractCallSite(),addNoRecurseAttrsTopDown(),determinePointerAccessAttrs(),llvm::AbstractCallSite::isCallee(),isCallee(), andpromoteArguments().
| inline |
Determine if the invoke is convergent.
Definition at line1937 of fileInstrTypes.h.
ReferenceshasFnAttr().
Referenced bycanSplitCallSite(),hashCallInst(),llvm::InlineFunction(),InstrBreaksNonConvergent(),isEqualImpl(),llvm::CallLowering::lowerCall(), andllvm::SelectionDAGBuilder::LowerCallTo().
Definition at line1238 of fileInstrTypes.h.
Referencesassert(),data_operands_begin(), anddata_operands_end().
Referenced bygetDataOperandNo(), andisDataOperand().
| inline |
Definition at line1243 of fileInstrTypes.h.
ReferencesisDataOperand().
Determine whether this argument is passed in an alloca.
Definition at line1684 of fileInstrTypes.h.
ReferencesparamHasAttr().
bool CallBase::isIndirectCall | ( | ) | const |
Return true if the callsite is an indirect call.
Definition at line334 of fileInstructions.cpp.
ReferencesgetCalledOperand(), andisInlineAsm().
Referenced byllvm::InstrProfCallsite::canInstrumentCallsite(),handleGuaranteedWellDefinedOps(),llvm::AbstractCallSite::isDirectCall(),llvm::AbstractCallSite::isIndirectCall(),llvm::CallLowering::lowerCall(),llvm::RISCVTargetLowering::LowerCall(),llvm::SelectionDAGBuilder::LowerCallTo(),llvm::promoteCallWithIfThenElse(),restoreMutatedType(),runCGProfilePass(),llvm::IRSimilarity::IRInstructionData::setCalleeName(),llvm::PGOIndirectCallVisitor::tryGetVTableInstruction(), andllvm::IRSimilarity::IRInstructionMapper::InstructionClassification::visitCallInst().
| inline |
Check if this call is an inline asm statement.
Definition at line1408 of fileInstrTypes.h.
ReferencesgetCalledOperand().
Referenced byllvm::InstrProfCallsite::canInstrumentCallsite(),canParameterizeCallOperand(),llvm::GCNTTIImpl::isAlwaysUniform(),isIndirectCall(),restoreMutatedType(), andshouldConvertUse().
bool CallBase::isMustTailCall | ( | ) | const |
Tests if this call site must be tail call optimized.
Only aCallInst can be tail call optimized.
Definition at line343 of fileInstructions.cpp.
Referenced bydoCallSiteSplitting(),hasMustTailCallers(),llvm::isLegalToPromote(),llvm::Attributor::isValidFunctionSignatureRewrite(),llvm::SITargetLowering::LowerCall(),llvm::CallLowering::lowerCall(),llvm::LoongArchTargetLowering::LowerCall(),llvm::RISCVTargetLowering::LowerCall(),llvm::SelectionDAGBuilder::LowerCallSiteWithPtrAuthBundle(),promoteArguments(),RemovePreallocated(),splitCallSite(),llvm::SCCPSolver::tryToReplaceWithConstant(), andversionCallSiteWithCond().
| inline |
Return true if the call should not be treated as a call to a builtin.
Definition at line1875 of fileInstrTypes.h.
Referenced byaddMappingsFromTLI(),llvm::AMDGPULibCalls::fold(),llvm::TargetLibraryInfo::getLibFunc(),getVectorCallCosts(),llvm::LibCallSimplifier::optimizeCall(),llvm::LoopVectorizationCostModel::setVectorizedCallDecision(), andllvm::AMDGPULibCalls::useNative().
| inline |
Return true if the call should not be inlined.
Definition at line1884 of fileInstrTypes.h.
ReferenceshasFnAttr().
Return true if the operand at indexIdx
is a bundle operand that has tag IDID
.
Definition at line1993 of fileInstrTypes.h.
ReferencesgetOperandBundleForOperand(),llvm::OperandBundleUse::getTagID(),Idx, andisBundleOperand().
Referenced bycanParameterizeCallOperand().
Determine whether passing undef to this argument is undefined behavior.
If passing undef to this argument is UB, passing poison is UB as well because poison is more undefined than undef.
Definition at line1699 of fileInstrTypes.h.
ReferencesparamHasAttr().
Determine whether this argument is passed by value, in an alloca, or is preallocated.
Definition at line1690 of fileInstrTypes.h.
ReferencesparamHasAttr().
bool CallBase::isReturnNonNull | ( | ) | const |
Return true if the return value is known to be not null.
This may be because it has the nonnull attribute, or because at least one byte is dereferenceable and the pointer is in addrspace(0).
Definition at line385 of fileInstructions.cpp.
ReferencesgetCaller(),llvm::getPointerAddressSpace(),getRetDereferenceableBytes(),llvm::Value::getType(),hasRetAttr(), andllvm::NullPointerIsDefined().
| inline |
Determine if the call requires strict floating point semantics.
Definition at line1881 of fileInstrTypes.h.
ReferenceshasFnAttr().
Referenced byllvm::AMDGPULibCalls::fold().
bool CallBase::isTailCall | ( | ) | const |
Tests if this call site is marked as a tail call.
Definition at line350 of fileInstructions.cpp.
Referenced byllvm::CallLowering::lowerCall(), andllvm::SelectionDAGBuilder::LowerCallSiteWithPtrAuthBundle().
| inline |
Definition at line1201 of fileInstrTypes.h.
ReferencesFTy,llvm::FunctionType::getReturnType(), andllvm::Value::mutateType().
Referenced byllvm::promoteCall().
bool CallBase::onlyAccessesArgMemory | ( | ) | const |
Determine if the call can access memmory only using pointers based on its arguments.
Definition at line652 of fileInstructions.cpp.
ReferencesgetMemoryEffects(), andllvm::MemoryEffectsBase< LocationEnum >::onlyAccessesArgPointees().
Referenced byllvm::MemoryLocation::getForDest().
bool CallBase::onlyAccessesInaccessibleMemOrArgMem | ( | ) | const |
Determine if the function may only access memory that is either inaccessible from the IR or pointed to by its arguments.
Definition at line670 of fileInstructions.cpp.
ReferencesgetMemoryEffects(), andllvm::MemoryEffectsBase< LocationEnum >::onlyAccessesInaccessibleOrArgMem().
bool CallBase::onlyAccessesInaccessibleMemory | ( | ) | const |
Determine if the function may only access memory that is inaccessible from the IR.
Definition at line661 of fileInstructions.cpp.
ReferencesgetMemoryEffects(), andllvm::MemoryEffectsBase< LocationEnum >::onlyAccessesInaccessibleMem().
bool CallBase::onlyReadsMemory | ( | ) | const |
Determine if the call does not access or only reads memory.
Determine if the function does not access or only reads memory.
Definition at line635 of fileInstructions.cpp.
ReferencesgetMemoryEffects(), andllvm::MemoryEffectsBase< LocationEnum >::onlyReadsMemory().
Definition at line1721 of fileInstrTypes.h.
Referencesarg_size(),dataOperandHasImpliedAttr(), andisByValArgument().
Referenced bydeterminePointerAccessAttrs(),llvm::objcarc::GetCallSiteClass(),llvm::MemoryLocation::getForDest(), andllvm::getIntrinsicForCallSite().
bool CallBase::onlyWritesMemory | ( | ) | const |
Determine if the call does not access or only writes memory.
Determine if the function does not access or only writes memory.
Definition at line643 of fileInstructions.cpp.
ReferencesgetMemoryEffects(), andllvm::MemoryEffectsBase< LocationEnum >::onlyWritesMemory().
Definition at line1733 of fileInstrTypes.h.
ReferencesdataOperandHasImpliedAttr().
| inline |
Simple helper function to map aBundleOpInfo to anOperandBundleUse.
Definition at line2159 of fileInstrTypes.h.
Referencesllvm::CallBase::BundleOpInfo::Begin,llvm::CallBase::BundleOpInfo::End,llvm::User::op_begin(), andllvm::CallBase::BundleOpInfo::Tag.
Referenced bybundleOperandHasAttr(),getOperandBundleAt(), andgetOperandBundleForOperand().
bool CallBase::paramHasAttr | ( | unsigned | ArgNo, |
Attribute::AttrKind | Kind | ||
) | const |
Determine whether the argument or parameter has the given attribute.
Definition at line409 of fileInstructions.cpp.
Referencesarg_size(),assert(),Attrs,F,getCalledFunction(),hasClobberingOperandBundles(),llvm::AttributeList::hasParamAttr(), andhasReadingOperandBundles().
Referenced byAddAliasScopeMetadata(),AddParamAndFnBasicAttributes(),annotateDereferenceableBytes(),annotateNonNullNoUndefBasedOnAccess(),computeBytesPoppedByCalleeForSRet(),dataOperandHasImpliedAttr(),handleGuaranteedWellDefinedOps(),hasInAllocaArgument(),hasStructRetAttr(),llvm::AMDGPU::isArgPassedInSGPR(),isByValArgument(),isCondRelevantToAnyCallArgument(),isInAllocaArgument(),llvm::isLegalToPromote(),isPassingUndefUB(),isPassPointeeByValueArgument(), andprocessCallSite().
CallBase::op_iterator CallBase::populateBundleOperandInfos | ( | ArrayRef<OperandBundleDef > | Bundles, |
constunsigned | BeginIndex | ||
) |
Populate theBundleOpInfo instances and theUse& vector fromBundles
.
Return the op_iterator pointing to theUse& one past the last last bundle operand use.
EachOperandBundleDef
instance is tracked by a OperandBundleInfo instance allocated in thisUser's descriptor.
Definition at line490 of fileInstructions.cpp.
Referencesassert(),B,llvm::ArrayRef< T >::begin(),bundle_op_infos(),llvm::ArrayRef< T >::end(),llvm::Value::getContext(),llvm::User::op_begin(), andllvm::LLVMContext::pImpl.
| inline |
removes the attribute from the list of attributes.
Definition at line1506 of fileInstrTypes.h.
ReferencesAttrs,llvm::Value::getContext(), andllvm::AttributeList::removeAttributeAtIndex().
removes the attribute from the list of attributes.
Definition at line1511 of fileInstrTypes.h.
ReferencesAttrs,llvm::Value::getContext(), andllvm::AttributeList::removeAttributeAtIndex().
| inline |
Removes the attribute from the function.
Definition at line1521 of fileInstrTypes.h.
ReferencesAttrs,llvm::Value::getContext(), andllvm::AttributeList::removeFnAttribute().
Referenced byprocessCall(), andsetNotConvergent().
| inline |
Removes the attribute from the function.
Definition at line1526 of fileInstrTypes.h.
ReferencesAttrs,llvm::Value::getContext(), andllvm::AttributeList::removeFnAttribute().
| inline |
Removes the attributes from the function.
Definition at line1516 of fileInstrTypes.h.
ReferencesAttrs,llvm::Value::getContext(), andllvm::AttributeList::removeFnAttributes().
| static |
Create a clone ofCB
with operand bundleID
removed.
Definition at line574 of fileInstructions.cpp.
ReferencesCreate(),llvm::SmallVectorImpl< T >::emplace_back(),getNumOperandBundles(),getOperandBundleAt(), andI.
Referenced byllvm::objcarc::BundledRetainClaimRVs::eraseInst(),llvm::KCFIPass::run(), andSPIRVStripConvergentIntrinsics::runOnFunction().
| inline |
Removes the attribute from the given argument.
Definition at line1541 of fileInstrTypes.h.
Referencesarg_size(),assert(),Attrs,llvm::Value::getContext(), andllvm::AttributeList::removeParamAttribute().
Referenced byannotateDereferenceableBytes(),promoteArguments(),runIPSCCP(),setConstantInArgument(), andllvm::MemIntrinsicBase< Derived >::setDestAlignment().
Removes the attribute from the given argument.
Definition at line1547 of fileInstrTypes.h.
Referencesarg_size(),assert(),Attrs,llvm::Value::getContext(), andllvm::AttributeList::removeParamAttribute().
| inline |
Removes the attributes from the given argument.
Definition at line1553 of fileInstrTypes.h.
ReferencesAttrs,llvm::Value::getContext(), andllvm::AttributeList::removeParamAttributes().
Referenced bymergeAttributesAndFlags().
| inline |
Removes the attribute from the return value.
Definition at line1531 of fileInstrTypes.h.
ReferencesAttrs,llvm::Value::getContext(), andllvm::AttributeList::removeRetAttribute().
| inline |
Removes the attributes from the return value.
Definition at line1536 of fileInstrTypes.h.
ReferencesAttrs,llvm::Value::getContext(), andllvm::AttributeList::removeRetAttributes().
Referenced byllvm::InlineFunction(),mergeAttributesAndFlags(), andrunIPSCCP().
| inline |
Determine if the return value is marked with NoAlias attribute.
Definition at line1859 of fileInstrTypes.h.
ReferencesAttrs, andllvm::AttributeList::hasRetAttr().
Definition at line1291 of fileInstrTypes.h.
Referencesarg_size(),assert(), andllvm::User::setOperand().
Referenced byllvm::CoroIdInst::clearPromise(),createCoroSave(),despeculateCountZeros(),llvm::AMDGPULibCalls::fold(),OptimizeAwayTrappingUsesOfValue(),llvm::promoteCall(),llvm::DbgVariableIntrinsic::setArgOperand(),llvm::InstrProfCallsite::setCallee(),setConstantInArgument(),llvm::CoroIdInst::setCoroutineSelf(),llvm::MemIntrinsicBase< Derived >::setDest(),llvm::AtomicMemIntrinsic::setElementSizeInBytes(),llvm::InstrProfCntrInstBase::setIndex(),llvm::CoroIdInst::setInfo(),llvm::DbgLabelInst::setLabel(),llvm::MemIntrinsicBase< Derived >::setLength(),llvm::VPIntrinsic::setMaskParam(),llvm::InstrProfInstBase::setNameValue(),llvm::VPIntrinsic::setVectorLengthParam(),llvm::MemIntrinsic::setVolatile(),llvm::MemSetPatternIntrinsic::setVolatile(), andturnGuardIntoBranch().
| inline |
Set the attributes for this call.
Definition at line1420 of fileInstrTypes.h.
Referenced byllvm::createCallMatchingInvoke(),createThunk(),doPromotion(),emitBinaryFloatFnCallHelper(),emitUnaryFloatFnCallHelper(),expandAtan2Intrinsic(),INITIALIZE_PASS(),llvm::InlineFunction(),lowerAwaitSuspend(),makeStatepointExplicitImpl(),mergeAttributesAndFlags(),processCall(),processCallSite(),llvm::promoteCall(),RemoveAttribute(),tryIntersectAttributes(),tryToMoveFreeBeforeNullTest(), andllvm::UpgradeIntrinsicCall().
| inline |
Sets the function called, including updating the function type.
Definition at line1380 of fileInstrTypes.h.
Referencesllvm::Function::getFunctionType(), andsetCalledFunction().
Referenced byllvm::AMDGPULibCalls::fold(),lowerFunnelShifts(),processCall(),setCalledFunction(),llvm::UpgradeIntrinsicCall(),llvm::AMDGPULibCalls::useNative(), andllvm::InstCombinerImpl::visitCallInst().
| inline |
Sets the function called, including updating the function type.
Definition at line1385 of fileInstrTypes.h.
Referencesllvm::FunctionCallee::getCallee(),llvm::FunctionCallee::getFunctionType(), andsetCalledFunction().
| inline |
Sets the function called, including updating to the specified function type.
Definition at line1391 of fileInstrTypes.h.
Referencesassert(),FTy,llvm::FunctionType::getReturnType(),llvm::Value::getType(), andsetCalledOperand().
| inline |
Definition at line1377 of fileInstrTypes.h.
Referenced byOptimizeAwayTrappingUsesOfValue(),llvm::promoteCall(),setCalledFunction(), andllvm::UpgradeIntrinsicCall().
| inline |
Definition at line1403 of fileInstrTypes.h.
ReferencesCC.
Referenced byllvm::createCallMatchingInvoke(),CreateGCRelocates(),llvm::IRBuilderBase::CreateMalloc(),createThunk(),doPromotion(),emitBinaryFloatFnCallHelper(),llvm::emitCalloc(),llvm::emitFPutC(),llvm::emitFPutS(),llvm::emitFWrite(),llvm::emitHotColdNew(),llvm::emitHotColdNewAligned(),llvm::emitHotColdNewAlignedNoThrow(),llvm::emitHotColdNewNoThrow(),llvm::emitHotColdSizeReturningNew(),llvm::emitHotColdSizeReturningNewAligned(),emitLibCall(),llvm::emitMalloc(),llvm::emitMemCpyChk(),llvm::emitPutChar(),llvm::emitPutS(),emitUnaryFloatFnCallHelper(),INITIALIZE_PASS(),llvm::InlineFunction(),lowerAwaitSuspend(),makeStatepointExplicitImpl(), andprocessCall().
| inline |
Definition at line1930 of fileInstrTypes.h.
ReferencesaddFnAttr().
Referenced bysetCannotDuplicate(), andsetDXILAttributes().
| inline |
Definition at line1934 of fileInstrTypes.h.
ReferencesaddFnAttr().
| inline |
Definition at line1938 of fileInstrTypes.h.
ReferencesaddFnAttr().
void CallBase::setDoesNotAccessMemory | ( | ) |
Definition at line630 of fileInstructions.cpp.
Referencesllvm::MemoryEffectsBase< LocationEnum >::none(), andsetMemoryEffects().
Referenced bysetDXILAttributes().
| inline |
Definition at line1919 of fileInstrTypes.h.
ReferencesaddFnAttr().
Referenced byaddBoundsChecking(), andsetDXILAttributes().
| inline |
Definition at line1926 of fileInstrTypes.h.
ReferencesaddFnAttr().
Referenced byaddBoundsChecking(),llvm::OpenMPIRBuilder::emitUserDefinedMapper(),llvm::InlineFunction(), andllvm::InstCombinerImpl::visitCallInst().
| inline |
Definition at line1885 of fileInstrTypes.h.
ReferencesaddFnAttr().
void CallBase::setMemoryEffects | ( | MemoryEffects | ME | ) |
Definition at line622 of fileInstructions.cpp.
ReferencesaddFnAttr(),llvm::Value::getContext(), andllvm::Attribute::getWithMemoryEffects().
Referenced bysetDoesNotAccessMemory(),setOnlyAccessesArgMemory(),setOnlyAccessesInaccessibleMemOrArgMem(),setOnlyAccessesInaccessibleMemory(),setOnlyReadsMemory(), andsetOnlyWritesMemory().
| inline |
Definition at line1939 of fileInstrTypes.h.
ReferencesremoveFnAttr().
void CallBase::setOnlyAccessesArgMemory | ( | ) |
Definition at line655 of fileInstructions.cpp.
Referencesllvm::MemoryEffectsBase< LocationEnum >::argMemOnly(),getMemoryEffects(), andsetMemoryEffects().
void CallBase::setOnlyAccessesInaccessibleMemOrArgMem | ( | ) |
Definition at line673 of fileInstructions.cpp.
ReferencesgetMemoryEffects(),llvm::MemoryEffectsBase< LocationEnum >::inaccessibleOrArgMemOnly(), andsetMemoryEffects().
void CallBase::setOnlyAccessesInaccessibleMemory | ( | ) |
Definition at line664 of fileInstructions.cpp.
ReferencesgetMemoryEffects(),llvm::MemoryEffectsBase< LocationEnum >::inaccessibleMemOnly(), andsetMemoryEffects().
void CallBase::setOnlyReadsMemory | ( | ) |
Definition at line638 of fileInstructions.cpp.
ReferencesgetMemoryEffects(),llvm::MemoryEffectsBase< LocationEnum >::readOnly(), andsetMemoryEffects().
Referenced bysetDXILAttributes().
void CallBase::setOnlyWritesMemory | ( | ) |
Definition at line646 of fileInstructions.cpp.
ReferencesgetMemoryEffects(),setMemoryEffects(), andllvm::MemoryEffectsBase< LocationEnum >::writeOnly().
Try to intersect the attributes from 'this'CallBase and the 'Other'CallBase.
Sets the intersected attributes to 'this' and return true if successful. Doesn't modify 'this' and returns false if unsuccessful.
Definition at line1436 of fileInstrTypes.h.
ReferencesgetAttributes(),llvm::Value::getContext(),llvm::Other, andsetAttributes().
| protected |
parameter attributes for callable
Definition at line1126 of fileInstrTypes.h.
Referenced byaddAttributeAtIndex(),addDereferenceableParamAttr(),addDereferenceableRetAttr(),addFnAttr(),addParamAttr(),addRangeRetAttr(),addRetAttr(),getArgOperandWithAttribute(),getAttributes(),getParamAlign(),getParamByRefType(),getParamByValType(),getParamDereferenceableBytes(),getParamDereferenceableOrNullBytes(),getParamElementType(),getParamInAllocaType(),getParamNoFPClass(),getParamPreallocatedType(),getParamStackAlign(),getParamStructRetType(),getRetAlign(),getRetAttr(),getRetDereferenceableBytes(),getRetDereferenceableOrNullBytes(),getRetNoFPClass(),hasByValArgument(),paramHasAttr(),removeAttributeAtIndex(),removeFnAttr(),removeFnAttrs(),removeParamAttr(),removeParamAttrs(),removeRetAttr(),removeRetAttrs(),returnDoesNotAlias(), andsetAttributes().
| staticconstexprprotected |
The last operand is the called operand.
Definition at line1124 of fileInstrTypes.h.
| protected |
Definition at line1127 of fileInstrTypes.h.
Referenced bygetFunctionType(),mutateFunctionType(), andsetCalledFunction().