LLVM
8.0.1
|
Base class for all callable instructions (InvokeInst and CallInst) 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 | |
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. More... | |
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 (const Use *U) const |
bool | isDataOperand (Value::const_user_iterator UI) const |
User::op_iterator | arg_begin () |
Return the iterator pointing to the beginning of the argument list. More... | |
User::const_op_iterator | arg_begin () const |
User::op_iterator | arg_end () |
Return the iterator pointing to the end of the argument list. More... | |
User::const_op_iterator | arg_end () const |
iterator_range< User::op_iterator > | args () |
Iteration adapter for range-for loops. More... | |
iterator_range< User::const_op_iterator > | args () const |
bool | arg_empty () const |
unsigned | arg_size () const |
iterator_range< User::op_iterator > | arg_operands () |
iterator_range< User::const_op_iterator > | arg_operands () const |
unsigned | getNumArgOperands () const |
Value * | getArgOperand (unsigned i) const |
void | setArgOperand (unsigned i, Value *v) |
const Use & | getArgOperandUse (unsigned i) const |
Wrappers for getting the Use of a call argument. More... | |
Use & | getArgOperandUse (unsigned i) |
bool | isArgOperand (const Use *U) const |
bool | isArgOperand (Value::const_user_iterator UI) const |
bool | hasArgument (const Value *V) const |
Returns true if this CallSite passes the given Value* as an argument to the called function. More... | |
Value * | getCalledOperand () const |
Value * | getCalledValue () const |
const Use & | getCalledOperandUse () const |
Use & | getCalledOperandUse () |
Function * | getCalledFunction () const |
Returns the function called, or null if this is an indirect function invocation. More... | |
bool | isIndirectCall () const |
Return true if the callsite is an indirect call. More... | |
bool | isCallee (Value::const_user_iterator UI) const |
Determine whether the passed iterator points to the callee operand's Use. More... | |
bool | isCallee (const Use *U) const |
Determine whether this Use is the callee operand's Use. More... | |
Function * | getCaller () |
Helper to get the caller (the parent function). More... | |
const Function * | getCaller () const |
Intrinsic::ID | getIntrinsicID () const |
Returns the intrinsic ID of the intrinsic called or Intrinsic::not_intrinsic if the called function is not an intrinsic, or if this is an indirect call. More... | |
void | setCalledOperand (Value *V) |
void | setCalledFunction (Value *Fn) |
Sets the function called, including updating the function type. More... | |
void | setCalledFunction (FunctionType *FTy, Value *Fn) |
Sets the function called, including updating to the specified function type. More... | |
CallingConv::ID | getCallingConv () const |
void | setCallingConv (CallingConv::ID CC) |
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 parameter attributes for this call. More... | |
void | setAttributes (AttributeList A) |
Set the parameter attributes for this call. More... | |
bool | hasFnAttr (Attribute::AttrKind Kind) const |
Determine whether this call has the given attribute. More... | |
bool | hasFnAttr (StringRef Kind) const |
Determine whether this call has the given attribute. More... | |
void | addAttribute (unsigned i, Attribute::AttrKind Kind) |
adds the attribute to the list of attributes. More... | |
void | addAttribute (unsigned i, Attribute Attr) |
adds the attribute to the list of attributes. More... | |
void | addParamAttr (unsigned ArgNo, Attribute::AttrKind Kind) |
Adds the attribute to the indicated argument. More... | |
void | addParamAttr (unsigned ArgNo, Attribute Attr) |
Adds the attribute to the indicated argument. More... | |
void | removeAttribute (unsigned i, Attribute::AttrKind Kind) |
removes the attribute from the list of attributes. More... | |
void | removeAttribute (unsigned i, StringRef Kind) |
removes the attribute from the list of attributes. More... | |
void | removeParamAttr (unsigned ArgNo, Attribute::AttrKind Kind) |
Removes the attribute from the given argument. More... | |
void | removeParamAttr (unsigned ArgNo, StringRef Kind) |
Removes the attribute from the given argument. More... | |
void | addDereferenceableAttr (unsigned i, uint64_t Bytes) |
adds the dereferenceable attribute to the list of attributes. More... | |
void | addDereferenceableOrNullAttr (unsigned i, uint64_t Bytes) |
adds the dereferenceable_or_null attribute to the list of attributes. More... | |
bool | hasRetAttr (Attribute::AttrKind Kind) const |
Determine whether the return value has the given attribute. More... | |
bool | paramHasAttr (unsigned ArgNo, Attribute::AttrKind Kind) const |
Determine whether the argument or parameter has the given attribute. More... | |
Attribute | getAttribute (unsigned i, Attribute::AttrKind Kind) const |
Get the attribute of a given kind at a position. More... | |
Attribute | getAttribute (unsigned i, StringRef Kind) const |
Get the attribute of a given kind at a position. More... | |
Attribute | getParamAttr (unsigned ArgNo, Attribute::AttrKind Kind) const |
Get the attribute of a given kind from a given arg. More... | |
Attribute | getParamAttr (unsigned ArgNo, StringRef Kind) const |
Get the attribute of a given kind from a given arg. More... | |
bool | dataOperandHasImpliedAttr (unsigned i, Attribute::AttrKind Kind) const |
Return true if the data operand at index i has the attribute A . More... | |
bool | doesNotCapture (unsigned OpNo) const |
Determine whether this data operand is not captured. More... | |
bool | isByValArgument (unsigned ArgNo) const |
Determine whether this argument is passed by value. More... | |
bool | isInAllocaArgument (unsigned ArgNo) const |
Determine whether this argument is passed in an alloca. More... | |
bool | isByValOrInAllocaArgument (unsigned ArgNo) const |
Determine whether this argument is passed by value or in an alloca. More... | |
bool | hasInAllocaArgument () const |
Determine if there are is an inalloca argument. More... | |
bool | doesNotAccessMemory (unsigned OpNo) const |
bool | onlyReadsMemory (unsigned OpNo) const |
bool | doesNotReadMemory (unsigned OpNo) const |
unsigned | getRetAlignment () const |
Extract the alignment of the return value. More... | |
unsigned | getParamAlignment (unsigned ArgNo) const |
Extract the alignment for a call or parameter (0=unknown). More... | |
uint64_t | getDereferenceableBytes (unsigned i) const |
Extract the number of dereferenceable bytes for a call or parameter (0=unknown). More... | |
uint64_t | getDereferenceableOrNullBytes (unsigned i) const |
Extract the number of dereferenceable_or_null bytes for a call or parameter (0=unknown). More... | |
bool | isReturnNonNull () const |
Return true if the return value is known to be not null. More... | |
bool | returnDoesNotAlias () const |
Determine if the return value is marked with NoAlias attribute. More... | |
Value * | getReturnedArgOperand () const |
If one of the arguments has the 'returned' attribute, returns its operand value. More... | |
bool | isNoBuiltin () const |
Return true if the call should not be treated as a call to a builtin. More... | |
bool | isStrictFP () const |
Determine if the call requires strict floating point semantics. More... | |
bool | isNoInline () const |
Return true if the call should not be inlined. More... | |
void | setIsNoInline () |
bool | doesNotAccessMemory () const |
Determine if the call does not access memory. More... | |
void | setDoesNotAccessMemory () |
bool | onlyReadsMemory () const |
Determine if the call does not access or only reads memory. More... | |
void | setOnlyReadsMemory () |
bool | doesNotReadMemory () const |
Determine if the call does not access or only writes memory. More... | |
void | setDoesNotReadMemory () |
bool | onlyAccessesArgMemory () const |
Determine if the call can access memmory only using pointers based on its arguments. More... | |
void | setOnlyAccessesArgMemory () |
bool | onlyAccessesInaccessibleMemory () const |
Determine if the function may only access memory that is inaccessible from the IR. More... | |
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. More... | |
void | setOnlyAccessesInaccessibleMemOrArgMem () |
bool | doesNotReturn () const |
Determine if the call cannot return. More... | |
void | setDoesNotReturn () |
bool | doesNoCfCheck () const |
Determine if the call should not perform indirect branch tracking. More... | |
bool | doesNotThrow () const |
Determine if the call cannot unwind. More... | |
void | setDoesNotThrow () |
bool | cannotDuplicate () const |
Determine if the invoke cannot be duplicated. More... | |
void | setCannotDuplicate () |
bool | isConvergent () const |
Determine if the invoke is convergent. More... | |
void | setConvergent () |
void | setNotConvergent () |
bool | hasStructRetAttr () const |
Determine if the call returns a structure through first pointer argument. More... | |
bool | hasByValArgument () const |
Determine if any call argument is an aggregate passed by value. More... | |
Public Member Functions inherited from llvm::Instruction | |
Instruction (const Instruction &)=delete | |
Instruction & | operator= (const Instruction &)=delete |
Instruction * | user_back () |
Specialize the methods defined in Value, as we know that an instruction can only be used by other instructions. More... | |
const Instruction * | user_back () const |
const BasicBlock * | getParent () const |
BasicBlock * | getParent () |
const Module * | getModule () const |
Return the module owning the function this instruction belongs to or nullptr it the function does not have a module. More... | |
Module * | getModule () |
const Function * | getFunction () const |
Return the function this instruction belongs to. More... | |
Function * | getFunction () |
void | removeFromParent () |
This method unlinks 'this' from the containing basic block, but does not delete it. More... | |
SymbolTableList< Instruction >::iterator | eraseFromParent () |
This method unlinks 'this' from the containing basic block and deletes it. More... | |
void | insertBefore (Instruction *InsertPos) |
Insert an unlinked instruction into a basic block immediately before the specified instruction. More... | |
void | insertAfter (Instruction *InsertPos) |
Insert an unlinked instruction into a basic block immediately after the specified instruction. More... | |
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. More... | |
void | moveBefore (BasicBlock &BB, SymbolTableList< Instruction >::iterator I) |
Unlink this instruction and insert into BB before I. More... | |
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. More... | |
unsigned | getOpcode () const |
Returns a member of one of the enums like Instruction::Add. More... | |
const char * | getOpcodeName () const |
bool | isTerminator () const |
bool | isUnaryOp () const |
bool | isBinaryOp () const |
bool | isIntDivRem () const |
bool | isShift () |
bool | isCast () const |
bool | isFuncletPad () const |
bool | isExceptionalTerminator () const |
bool | isLogicalShift () const |
Return true if this is a logical shift left or a logical shift right. More... | |
bool | isArithmeticShift () const |
Return true if this is an arithmetic shift right. More... | |
bool | isBitwiseLogicOp () const |
Return true if this is and/or/xor. More... | |
bool | hasMetadata () const |
Return true if this instruction has any metadata attached to it. More... | |
bool | hasMetadataOtherThanDebugLoc () const |
Return true if this instruction has metadata attached to it other than a debug location. More... | |
MDNode * | getMetadata (unsigned KindID) const |
Get the metadata of given kind attached to this Instruction. More... | |
MDNode * | getMetadata (StringRef Kind) const |
Get the metadata of given kind attached to this Instruction. More... | |
void | getAllMetadata (SmallVectorImpl< std::pair< unsigned, MDNode *>> &MDs) const |
Get all metadata attached to this Instruction. More... | |
void | getAllMetadataOtherThanDebugLoc (SmallVectorImpl< std::pair< unsigned, MDNode *>> &MDs) const |
This does the same thing as getAllMetadata, except that it filters out the debug location. More... | |
void | getAAMetadata (AAMDNodes &N, bool Merge=false) const |
Fills the AAMDNodes structure with AA metadata from this instruction. More... | |
void | setMetadata (unsigned KindID, MDNode *Node) |
Set the metadata of the specified kind to the specified node. More... | |
void | setMetadata (StringRef Kind, MDNode *Node) |
void | copyMetadata (const Instruction &SrcInst, ArrayRef< unsigned > WL=ArrayRef< unsigned >()) |
Copy metadata from SrcInst to this instruction. More... | |
void | swapProfMetadata () |
If the instruction has "branch_weights" MD_prof metadata and the MDNode has three operands (including name string), swap the order of the metadata. More... | |
void | setAAMetadata (const AAMDNodes &N) |
Sets the metadata on this instruction from the AAMDNodes structure. More... | |
bool | extractProfMetadata (uint64_t &TrueVal, uint64_t &FalseVal) const |
Retrieve the raw weight values of a conditional branch or select. More... | |
bool | extractProfTotalWeight (uint64_t &TotalVal) const |
Retrieve total raw weight values of a branch. More... | |
void | updateProfWeight (uint64_t S, uint64_t T) |
Updates branch_weights metadata by scaling it by S / T . More... | |
void | setProfWeight (uint64_t W) |
Sets the branch_weights metadata to W for CallInst. More... | |
void | setDebugLoc (DebugLoc Loc) |
Set the debug location information for this instruction. More... | |
const DebugLoc & | getDebugLoc () const |
Return the debug location for this node as a DebugLoc. More... | |
void | setHasNoUnsignedWrap (bool b=true) |
Set or clear the nuw flag on this instruction, which must be an operator which supports this flag. More... | |
void | setHasNoSignedWrap (bool b=true) |
Set or clear the nsw flag on this instruction, which must be an operator which supports this flag. More... | |
void | setIsExact (bool b=true) |
Set or clear the exact flag on this instruction, which must be an operator which supports this flag. More... | |
bool | hasNoUnsignedWrap () const |
Determine whether the no unsigned wrap flag is set. More... | |
bool | hasNoSignedWrap () const |
Determine whether the no signed wrap flag is set. More... | |
void | dropPoisonGeneratingFlags () |
Drops flags that may cause this instruction to evaluate to poison despite having non-poison inputs. More... | |
bool | isExact () const |
Determine whether the exact flag is set. More... | |
void | setFast (bool B) |
Set or clear all fast-math-flags on this instruction, which must be an operator which supports this flag. More... | |
void | setHasAllowReassoc (bool B) |
Set or clear the reassociation flag on this instruction, which must be an operator which supports this flag. More... | |
void | setHasNoNaNs (bool B) |
Set or clear the no-nans flag on this instruction, which must be an operator which supports this flag. More... | |
void | setHasNoInfs (bool B) |
Set or clear the no-infs flag on this instruction, which must be an operator which supports this flag. More... | |
void | setHasNoSignedZeros (bool B) |
Set or clear the no-signed-zeros flag on this instruction, which must be an operator which supports this flag. More... | |
void | setHasAllowReciprocal (bool B) |
Set or clear the allow-reciprocal flag on this instruction, which must be an operator which supports this flag. More... | |
void | setHasApproxFunc (bool B) |
Set or clear the approximate-math-functions flag on this instruction, which must be an operator which supports this flag. More... | |
void | setFastMathFlags (FastMathFlags FMF) |
Convenience function for setting multiple fast-math flags on this instruction, which must be an operator which supports these flags. More... | |
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. More... | |
bool | isFast () const |
Determine whether all fast-math-flags are set. More... | |
bool | hasAllowReassoc () const |
Determine whether the allow-reassociation flag is set. More... | |
bool | hasNoNaNs () const |
Determine whether the no-NaNs flag is set. More... | |
bool | hasNoInfs () const |
Determine whether the no-infs flag is set. More... | |
bool | hasNoSignedZeros () const |
Determine whether the no-signed-zeros flag is set. More... | |
bool | hasAllowReciprocal () const |
Determine whether the allow-reciprocal flag is set. More... | |
bool | hasAllowContract () const |
Determine whether the allow-contract flag is set. More... | |
bool | hasApproxFunc () const |
Determine whether the approximate-math-functions flag is set. More... | |
FastMathFlags | getFastMathFlags () const |
Convenience function for getting all the fast-math flags, which must be an operator which supports these flags. More... | |
void | copyFastMathFlags (const Instruction *I) |
Copy I's fast-math flags. More... | |
void | copyIRFlags (const Value *V, bool IncludeWrapFlags=true) |
Convenience method to copy supported exact, fast-math, and (optionally) wrapping flags from V to this instruction. More... | |
void | andIRFlags (const Value *V) |
Logical 'and' of any supported wrapping, exact, and fast-math flags of V and this instruction. More... | |
void | applyMergedLocation (const DILocation *LocA, const DILocation *LocB) |
Merge 2 debug locations and apply it to the Instruction. More... | |
bool | isAssociative () const LLVM_READONLY |
Return true if the instruction is associative: More... | |
bool | isCommutative () const |
Return true if the instruction is commutative: More... | |
bool | isIdempotent () const |
Return true if the instruction is idempotent: More... | |
bool | isNilpotent () const |
Return true if the instruction is nilpotent: More... | |
bool | mayWriteToMemory () const |
Return true if this instruction may modify memory. More... | |
bool | mayReadFromMemory () const |
Return true if this instruction may read memory. More... | |
bool | mayReadOrWriteMemory () const |
Return true if this instruction may read or write memory. More... | |
bool | isAtomic () const |
Return true if this instruction has an AtomicOrdering of unordered or higher. More... | |
bool | hasAtomicLoad () const |
Return true if this atomic instruction loads from memory. More... | |
bool | hasAtomicStore () const |
Return true if this atomic instruction stores to memory. More... | |
bool | mayThrow () const |
Return true if this instruction may throw an exception. More... | |
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. More... | |
bool | mayHaveSideEffects () const |
Return true if the instruction may have side effects. More... | |
bool | isSafeToRemove () const |
Return true if the instruction can be removed if the result is unused. More... | |
bool | isEHPad () const |
Return true if the instruction is a variety of EH-block. More... | |
bool | isLifetimeStartOrEnd () const |
Return true if the instruction is a llvm.lifetime.start or llvm.lifetime.end marker. More... | |
const Instruction * | getNextNonDebugInstruction () const |
Return a pointer to the next non-debug instruction in the same basic block as 'this', or nullptr if no such instruction exists. More... | |
Instruction * | getNextNonDebugInstruction () |
const Instruction * | getPrevNonDebugInstruction () const |
Return a pointer to the previous non-debug instruction in the same basic block as 'this', or nullptr if no such instruction exists. More... | |
Instruction * | getPrevNonDebugInstruction () |
Instruction * | clone () const |
Create a copy of 'this' instruction that is identical in all ways except the following: More... | |
bool | isIdenticalTo (const Instruction *I) const |
Return true if the specified instruction is exactly identical to the current one. More... | |
bool | isIdenticalToWhenDefined (const Instruction *I) const |
This is like isIdenticalTo, except that it ignores the SubclassOptionalData flags, which may specify conditions under which the instruction's result is undefined. More... | |
bool | isSameOperationAs (const Instruction *I, unsigned flags=0) const |
This function determines if the specified instruction executes the same operation as the current one. More... | |
bool | isUsedOutsideOfBlock (const BasicBlock *BB) const |
Return true if there are any uses of this instruction in blocks other than the specified block. More... | |
unsigned | getNumSuccessors () const |
Return the number of successors that this instruction has. More... | |
BasicBlock * | getSuccessor (unsigned Idx) const |
Return the specified successor. This instruction must be a terminator. More... | |
void | setSuccessor (unsigned Idx, BasicBlock *BB) |
Update the specified successor to point at the provided block. More... | |
void | dropUnknownNonDebugMetadata (ArrayRef< unsigned > KnownIDs) |
Drop all unknown metadata except for debug locations. More... | |
void | dropUnknownNonDebugMetadata () |
void | dropUnknownNonDebugMetadata (unsigned ID1) |
void | dropUnknownNonDebugMetadata (unsigned ID1, unsigned ID2) |
Public Member Functions inherited from llvm::User | |
User (const User &)=delete | |
void | operator delete (void *Usr) |
Free memory allocated for User and Use objects. More... | |
void | operator delete (void *Usr, unsigned) |
Placement delete - required by std, called if the ctor throws. More... | |
void | operator delete (void *Usr, unsigned, bool) |
Placement delete - required by std, called if the ctor throws. More... | |
const Use * | getOperandList () const |
Use * | getOperandList () |
Value * | getOperand (unsigned i) const |
void | setOperand (unsigned i, Value *Val) |
const Use & | getOperandUse (unsigned i) const |
Use & | getOperandUse (unsigned i) |
unsigned | getNumOperands () const |
ArrayRef< const uint8_t > | getDescriptor () const |
Returns the descriptor co-allocated with this User instance. More... | |
MutableArrayRef< uint8_t > | getDescriptor () |
Returns the descriptor co-allocated with this User instance. More... | |
void | setGlobalVariableNumOperands (unsigned NumOps) |
Set the number of operands on a GlobalVariable. More... | |
void | setNumHungOffUseOperands (unsigned NumOps) |
Subclasses with hung off uses need to manage the operand count themselves. More... | |
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. More... | |
void | replaceUsesOfWith (Value *From, Value *To) |
Replace uses of one Value with another. More... | |
Public Member Functions inherited from llvm::Value | |
Value (const Value &)=delete | |
Value & | operator= (const Value &)=delete |
void | deleteValue () |
Delete a pointer to a generic Value. More... | |
void | dump () const |
Support for debugging, callable in GDB: V->dump() More... | |
Type * | getType () const |
All values are typed, get the type of this value. More... | |
LLVMContext & | getContext () const |
All values hold a context through their type. More... | |
bool | hasName () const |
ValueName * | getValueName () const |
void | setValueName (ValueName *VN) |
StringRef | getName () const |
Return a constant reference to the value's name. More... | |
void | setName (const Twine &Name) |
Change the name of the value. More... | |
void | takeName (Value *V) |
Transfer the name from V to this value. More... | |
void | replaceAllUsesWith (Value *V) |
Change all uses of this to point to a new Value. More... | |
void | replaceNonMetadataUsesWith (Value *V) |
Change non-metadata uses of this to point to a new Value. More... | |
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. More... | |
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 () |
const User * | 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 user of this value. More... | |
bool | hasNUses (unsigned N) const |
Return true if this Value has exactly N users. More... | |
bool | hasNUsesOrMore (unsigned N) const |
Return true if this value has N users or more. More... | |
bool | isUsedInBasicBlock (const BasicBlock *BB) const |
Check if this value is used in the specified basic block. More... | |
unsigned | getNumUses () const |
This method computes the number of uses of this Value. More... | |
void | addUse (Use &U) |
This method should only be used by the Use class. More... | |
unsigned | getValueID () const |
Return an ID for the concrete type of this object. More... | |
unsigned | getRawSubclassOptionalData () const |
Return the raw optional flags value contained in this value. More... | |
void | clearSubclassOptionalData () |
Clear the optional flags contained in this value. More... | |
bool | hasSameSubclassOptionalData (const Value *V) const |
Check the optional flags for equality. More... | |
bool | hasValueHandle () const |
Return true if there is a value handle associated with this value. More... | |
bool | isUsedByMetadata () const |
Return true if there is metadata referencing this value. More... | |
bool | isSwiftError () const |
Return true if this value is a swifterror value. More... | |
const Value * | stripPointerCasts () const |
Strip off pointer casts, all-zero GEPs, and aliases. More... | |
Value * | stripPointerCasts () |
const Value * | stripPointerCastsAndInvariantGroups () const |
Strip off pointer casts, all-zero GEPs, aliases and invariant group info. More... | |
Value * | stripPointerCastsAndInvariantGroups () |
const Value * | stripPointerCastsNoFollowAliases () const |
Strip off pointer casts and all-zero GEPs. More... | |
Value * | stripPointerCastsNoFollowAliases () |
const Value * | stripInBoundsConstantOffsets () const |
Strip off pointer casts and all-constant inbounds GEPs. More... | |
Value * | stripInBoundsConstantOffsets () |
const Value * | stripAndAccumulateInBoundsConstantOffsets (const DataLayout &DL, APInt &Offset) const |
Accumulate offsets from stripInBoundsConstantOffsets(). More... | |
Value * | stripAndAccumulateInBoundsConstantOffsets (const DataLayout &DL, APInt &Offset) |
const Value * | stripInBoundsOffsets () const |
Strip off pointer casts and inbounds GEPs. More... | |
Value * | stripInBoundsOffsets () |
uint64_t | getPointerDereferenceableBytes (const DataLayout &DL, bool &CanBeNull) const |
Returns the number of bytes known to be dereferenceable for the pointer value. More... | |
unsigned | getPointerAlignment (const DataLayout &DL) const |
Returns an alignment of the pointer value. More... | |
const Value * | DoPHITranslation (const BasicBlock *CurBB, const BasicBlock *PredBB) const |
Translate PHI node to its predecessor from the given basic block. More... | |
Value * | DoPHITranslation (const BasicBlock *CurBB, const BasicBlock *PredBB) |
void | mutateType (Type *Ty) |
Mutate the type of this Value to be of the specified type. More... | |
template<class Compare > | |
void | sortUseList (Compare Cmp) |
Sort the use-list. More... | |
void | reverseUseList () |
Reverse the use-list. More... | |
void | print (raw_ostream &O, bool IsForDebug=false) const |
Implement operator<< on Value. More... | |
void | print (raw_ostream &O, ModuleSlotTracker &MST, bool IsForDebug=false) const |
void | printAsOperand (raw_ostream &O, bool PrintType=true, const Module *M=nullptr) const |
Print the name of this Value out to the specified raw_ostream. More... | |
void | printAsOperand (raw_ostream &O, bool PrintType, ModuleSlotTracker &MST) const |
Public Member Functions inherited from llvm::ilist_node_with_parent< Instruction, BasicBlock > | |
Instruction * | getPrevNode () |
const Instruction * | getPrevNode () const |
Get the previous node, or nullptr for the list head. More... | |
Instruction * | getNextNode () |
Get the next node, or nullptr for the list tail. More... | |
const Instruction * | getNextNode () const |
Get the next node, or nullptr for the list tail. More... | |
Public Member Functions inherited from llvm::ilist_node_impl< ilist_detail::compute_node_options< Instruction, Options... >::type > | |
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. More... | |
Static Public Member Functions | |
static bool | classof (const Instruction *I) |
static bool | classof (const Value *V) |
Static Public Member Functions inherited from llvm::Instruction | |
static const char * | getOpcodeName (unsigned OpCode) |
static bool | isTerminator (unsigned OpCode) |
static bool | isUnaryOp (unsigned Opcode) |
static bool | isBinaryOp (unsigned Opcode) |
static bool | isIntDivRem (unsigned Opcode) |
static bool | isShift (unsigned Opcode) |
Determine if the Opcode is one of the shift instructions. More... | |
static bool | isBitwiseLogicOp (unsigned Opcode) |
Determine if the Opcode is and/or/xor. More... | |
static bool | isCast (unsigned OpCode) |
Determine if the OpCode is one of the CastInst instructions. More... | |
static bool | isFuncletPad (unsigned OpCode) |
Determine if the OpCode is one of the FuncletPadInst instructions. More... | |
static bool | isExceptionalTerminator (unsigned OpCode) |
Returns true if the OpCode is a terminator related to exception handling. More... | |
static bool | isAssociative (unsigned Opcode) |
static bool | isCommutative (unsigned Opcode) |
static bool | isIdempotent (unsigned Opcode) |
static bool | isNilpotent (unsigned Opcode) |
static bool | classof (const Value *V) |
Methods for support type inquiry through isa, cast, and dyn_cast: More... | |
Static Public Member Functions inherited from llvm::User | |
static bool | classof (const Value *V) |
Protected Member Functions | |
template<class... ArgsTy> | |
CallBase (AttributeList const &A, FunctionType *FT, ArgsTy &&... Args) | |
bool | hasDescriptor () const |
unsigned | getNumSubclassExtraOperands () const |
Protected Member Functions inherited from llvm::Instruction | |
~Instruction () | |
void | setInstructionSubclassData (unsigned short D) |
unsigned | getSubclassDataFromInstruction () const |
Instruction (Type *Ty, unsigned iType, Use *Ops, unsigned NumOps, Instruction *InsertBefore=nullptr) | |
Instruction (Type *Ty, unsigned iType, Use *Ops, unsigned NumOps, BasicBlock *InsertAtEnd) | |
Protected Member Functions inherited from llvm::User | |
void * | operator new (size_t Size) |
Allocate a User with an operand pointer co-allocated. More... | |
void * | operator new (size_t Size, unsigned Us) |
Allocate a User with the operands co-allocated. More... | |
void * | operator new (size_t Size, unsigned Us, unsigned DescBytes) |
Allocate a User with the operands co-allocated. More... | |
User (Type *ty, unsigned vty, Use *, unsigned NumOps) | |
void | allocHungoffUses (unsigned N, bool IsPhi=false) |
Allocate the array of Uses, followed by a pointer (with bottom bit set) to the User. More... | |
void | growHungoffUses (unsigned N, bool IsPhi=false) |
Grow the number of hung off uses. More... | |
~User ()=default | |
template<int Idx> | |
Use & | Op () |
template<int Idx> | |
const Use & | Op () const |
Protected Member Functions inherited from llvm::Value | |
Value (Type *Ty, unsigned scid) | |
~Value () | |
Value's destructor should be virtual by design, but that would require that Value and all of its subclasses have a vtable that effectively duplicates the information in the value ID. More... | |
unsigned short | getSubclassDataFromValue () const |
void | setValueSubclassData (unsigned short D) |
Protected Member Functions inherited from llvm::ilist_node_with_parent< Instruction, BasicBlock > | |
ilist_node_with_parent ()=default | |
Protected Member Functions inherited from llvm::ilist_node_impl< ilist_detail::compute_node_options< Instruction, Options... >::type > | |
ilist_node_impl ()=default | |
Protected Attributes | |
AttributeList | Attrs |
parameter attributes for callable More... | |
FunctionType * | FTy |
Protected Attributes inherited from llvm::Value | |
unsigned char | SubclassOptionalData: 7 |
Hold subclass data that can be dropped. More... | |
unsigned | NumUserOperands: NumUserOperandsBits |
unsigned | IsUsedByMD: 1 |
unsigned | HasName: 1 |
unsigned | HasHungOffUses: 1 |
unsigned | HasDescriptor: 1 |
Static Protected Attributes | |
static constexpr int | CalledOperandOpEndIdx = -1 |
The last operand is the called operand. More... | |
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 = const BundleOpInfo * |
unsigned | getNumOperandBundles () const |
Return the number of operand bundles associated with this User. More... | |
bool | hasOperandBundles () const |
Return true if this User has any operand bundles. More... | |
unsigned | getBundleOperandsStartIndex () const |
Return the index of the first bundle operand in the Use array. More... | |
unsigned | getBundleOperandsEndIndex () const |
Return the index of the last bundle operand in the Use array. More... | |
bool | isBundleOperand (unsigned Idx) const |
Return true if the operand at index Idx is a bundle operand. More... | |
bool | isBundleOperand (const Use *U) const |
Returns true if the use is a bundle operand. More... | |
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. More... | |
OperandBundleUse | getOperandBundleAt (unsigned Index) const |
Return the operand bundle at a specific index. More... | |
unsigned | countOperandBundlesOfType (StringRef Name) const |
Return the number of operand bundles with the tag Name attached to this instruction. More... | |
unsigned | countOperandBundlesOfType (uint32_t ID) const |
Return the number of operand bundles with the tag ID attached to this instruction. More... | |
Optional< OperandBundleUse > | getOperandBundle (StringRef Name) const |
Return an operand bundle by name, if present. More... | |
Optional< OperandBundleUse > | getOperandBundle (uint32_t ID) const |
Return an operand bundle by tag ID, if present. More... | |
void | getOperandBundlesAsDefs (SmallVectorImpl< OperandBundleDef > &Defs) const |
Return the list of operand bundles attached to this instruction as a vector of OperandBundleDefs. More... | |
OperandBundleUse | getOperandBundleForOperand (unsigned OpIdx) const |
Return the operand bundle for the operand at index OpIdx. More... | |
bool | hasReadingOperandBundles () const |
Return true if this operand bundle user has operand bundles that may read from the heap. More... | |
bool | hasClobberingOperandBundles () const |
Return true if this operand bundle user has operand bundles that may write to the heap. More... | |
bool | bundleOperandHasAttr (unsigned OpIdx, Attribute::AttrKind A) const |
Return true if the bundle operand at index OpIdx has the attribute A . More... | |
bool | hasIdenticalOperandBundleSchema (const CallBase &Other) const |
Return true if Other has the same sequence of operand bundle tags with the same number of operands on each one of them as this OperandBundleUser. More... | |
bool | hasOperandBundlesOtherThan (ArrayRef< uint32_t > IDs) const |
Return true if this operand bundle user contains operand bundles with tags other than those specified in IDs . More... | |
bool | isFnAttrDisallowedByOpBundle (StringRef S) const |
Is the function attribute S disallowed by some operand bundle on this operand bundle user? More... | |
bool | isFnAttrDisallowedByOpBundle (Attribute::AttrKind A) const |
Is the function attribute A disallowed by some operand bundle on this operand bundle user? More... | |
OperandBundleUse | operandBundleFromBundleOpInfo (const BundleOpInfo &BOI) const |
Simple helper function to map a BundleOpInfo to an OperandBundleUse. More... | |
bundle_op_iterator | bundle_op_info_begin () |
Return the start of the list of BundleOpInfo instances associated with this OperandBundleUser. More... | |
const_bundle_op_iterator | bundle_op_info_begin () const |
Return the start of the list of BundleOpInfo instances associated with this OperandBundleUser. More... | |
bundle_op_iterator | bundle_op_info_end () |
Return the end of the list of BundleOpInfo instances associated with this OperandBundleUser. More... | |
const_bundle_op_iterator | bundle_op_info_end () const |
Return the end of the list of BundleOpInfo instances associated with this OperandBundleUser. More... | |
iterator_range< bundle_op_iterator > | bundle_op_infos () |
Return the range [bundle_op_info_begin , bundle_op_info_end ). More... | |
iterator_range< const_bundle_op_iterator > | bundle_op_infos () const |
Return the range [bundle_op_info_begin , bundle_op_info_end ). More... | |
op_iterator | populateBundleOperandInfos (ArrayRef< OperandBundleDef > Bundles, const unsigned BeginIndex) |
Populate the BundleOpInfo instances and the Use& vector from Bundles . More... | |
const BundleOpInfo & | getBundleOpInfoForOperand (unsigned OpIdx) const |
Return the BundleOpInfo for the operand at index OpIdx. More... | |
static unsigned | CountBundleInputs (ArrayRef< OperandBundleDef > Bundles) |
Return the total number of values used in Bundles . More... | |
Additional Inherited Members | |
Public Types inherited from llvm::Instruction | |
enum | OperationEquivalenceFlags { CompareIgnoringAlignment = 1<<0, CompareUsingScalarTypes = 1<<1 } |
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 |
Public Types inherited from llvm::User | |
using | op_iterator = Use * |
using | const_op_iterator = const Use * |
using | op_range = iterator_range< op_iterator > |
using | const_op_range = iterator_range< const_op_iterator > |
Public Types inherited from llvm::Value | |
enum | ValueTy |
Concrete subclass of this. More... | |
using | use_iterator = use_iterator_impl< Use > |
using | const_use_iterator = use_iterator_impl< const Use > |
using | user_iterator = user_iterator_impl< User > |
using | const_user_iterator = user_iterator_impl< const User > |
Static Public Attributes inherited from llvm::Value | |
static const unsigned | MaxAlignmentExponent = 29 |
The maximum alignment for instructions. More... | |
static const unsigned | MaximumAlignment = 1u << MaxAlignmentExponent |
Protected Types inherited from llvm::Value | |
enum | : unsigned { NumUserOperandsBits = 28 } |
The number of operands in the subclass. More... | |
Protected Types inherited from llvm::ilist_node_impl< ilist_detail::compute_node_options< Instruction, Options... >::type > | |
using | self_iterator = ilist_iterator< ilist_detail::compute_node_options< Instruction, Options... >::type, false, false > |
using | const_self_iterator = ilist_iterator< ilist_detail::compute_node_options< Instruction, Options... >::type, false, true > |
using | reverse_self_iterator = ilist_iterator< ilist_detail::compute_node_options< Instruction, Options... >::type, true, false > |
using | const_reverse_self_iterator = ilist_iterator< ilist_detail::compute_node_options< Instruction, Options... >::type, true, true > |
Static Protected Member Functions inherited from llvm::User | |
template<int Idx, typename U > | |
static Use & | OpFrom (const U *that) |
Base class for all callable instructions (InvokeInst and CallInst) 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 line 1014 of file InstrTypes.h.
Definition at line 1846 of file InstrTypes.h.
Definition at line 1847 of file InstrTypes.h.
|
inlineprotected |
Definition at line 1023 of file InstrTypes.h.
References llvm::Instruction::Instruction().
|
inline |
adds the attribute to the list of attributes.
Definition at line 1261 of file InstrTypes.h.
References llvm::AttributeList::addAttribute(), and llvm::Intrinsic::getAttributes().
Referenced by INITIALIZE_PASS(), insertSinCosCall(), llvm::maybeMarkSanitizerLibraryCallNoBuiltin(), optimizeSQRT(), and llvm::InstCombiner::visitCallInst().
adds the attribute to the list of attributes.
Definition at line 1268 of file InstrTypes.h.
References llvm::AttributeList::addAttribute(), and llvm::Intrinsic::getAttributes().
|
inline |
adds the dereferenceable attribute to the list of attributes.
Definition at line 1321 of file InstrTypes.h.
References llvm::AttributeList::addDereferenceableAttr(), and llvm::Intrinsic::getAttributes().
|
inline |
adds the dereferenceable_or_null attribute to the list of attributes.
Definition at line 1329 of file InstrTypes.h.
References llvm::AttributeList::addDereferenceableOrNullAttr(), llvm::Intrinsic::getAttributes(), and Kind.
|
inline |
Adds the attribute to the indicated argument.
Definition at line 1275 of file InstrTypes.h.
References llvm::AttributeList::addParamAttribute(), assert(), and llvm::Intrinsic::getAttributes().
Referenced by canTransformToMemCmp(), llvm::IRBuilderBase::CreateElementUnorderedAtomicMemMove(), getOrInsertValueProfilingCall(), INITIALIZE_PASS(), llvm::MemIntrinsicBase< AnyMemIntrinsic >::setDestAlignment(), and shouldKeepInEntry().
Adds the attribute to the indicated argument.
Definition at line 1283 of file InstrTypes.h.
References llvm::AttributeList::addParamAttribute(), assert(), and llvm::Intrinsic::getAttributes().
|
inline |
Return the iterator pointing to the beginning of the argument list.
Definition at line 1100 of file InstrTypes.h.
Referenced by changeToCall(), llvm::changeToInvokeAndSplitBasicBlock(), llvm::CallInst::Create(), llvm::InvokeInst::Create(), llvm::AAResults::getModRefInfo(), llvm::InlineFunction(), isContiguous(), and llvm::makeGuardControlFlowExplicit().
|
inline |
Definition at line 1101 of file InstrTypes.h.
|
inline |
Definition at line 1122 of file InstrTypes.h.
|
inline |
Return the iterator pointing to the end of the argument list.
Definition at line 1106 of file InstrTypes.h.
Referenced by changeToCall(), llvm::changeToInvokeAndSplitBasicBlock(), llvm::CallInst::Create(), llvm::InvokeInst::Create(), llvm::AAResults::getModRefInfo(), llvm::InlineFunction(), isContiguous(), and llvm::makeGuardControlFlowExplicit().
|
inline |
Definition at line 1111 of file InstrTypes.h.
|
inline |
Definition at line 1127 of file InstrTypes.h.
References llvm::make_range().
Referenced by llvm::slpvectorizer::BoUpSLP::canMapToVector(), despeculateCountZeros(), getOffsetFromIndices(), getVectorCallCost(), getVectorIntrinsicCost(), llvm::InlineFunction(), instrumentMaskedLoadOrStore(), markTails(), SimplifyNVVMIntrinsic(), and upgradeAVX512MaskToSelect().
|
inline |
Definition at line 1130 of file InstrTypes.h.
References llvm::make_range().
|
inline |
Definition at line 1123 of file InstrTypes.h.
Referenced by getParentPad(), getSuccPad(), and isFuncOrArgAttr().
|
inline |
Iteration adapter for range-for loops.
Definition at line 1116 of file InstrTypes.h.
References llvm::make_range().
Referenced by llvm::GlobalsAAResult::alias(), and getParentPad().
|
inline |
Definition at line 1119 of file InstrTypes.h.
References llvm::make_range().
|
inline |
Return the start of the list of BundleOpInfo instances associated with this OperandBundleUser.
OperandBundleUser uses the descriptor area co-allocated with the host User 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 this User'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 by User'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 to User.
The regular Use& vector for the User starts at U0. The operand bundle uses are part of the Use& vector, just like normal uses. In the diagram above, the operand bundle uses start at BOI0_U0. Each instance of BundleOpInfo 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 the User using this class via the BeginIdx argument in populateBundleOperandInfos.
Currently operand bundle users with hung-off operands are not supported.
Definition at line 1895 of file InstrTypes.h.
Referenced by bundle_op_info_begin(), llvm::CallInst::CreateFree(), hasIdenticalOperandBundleSchema(), and populateBundleOperandInfos().
|
inline |
Return the start of the list of BundleOpInfo instances associated with this OperandBundleUser.
Definition at line 1905 of file InstrTypes.h.
References bundle_op_info_begin().
|
inline |
Return the end of the list of BundleOpInfo instances associated with this OperandBundleUser.
Definition at line 1912 of file InstrTypes.h.
Referenced by bundle_op_info_end(), llvm::CallInst::CreateFree(), and populateBundleOperandInfos().
|
inline |
Return the end of the list of BundleOpInfo instances associated with this OperandBundleUser.
Definition at line 1922 of file InstrTypes.h.
References bundle_op_info_end().
|
inline |
Return the range [bundle_op_info_begin
, bundle_op_info_end
).
Definition at line 1928 of file InstrTypes.h.
References llvm::make_range().
|
inline |
Return the range [bundle_op_info_begin
, bundle_op_info_end
).
Definition at line 1933 of file InstrTypes.h.
References llvm::make_range().
|
inline |
Return true if the bundle operand at index OpIdx
has the attribute A
.
Definition at line 1755 of file InstrTypes.h.
|
inline |
Determine if the invoke cannot be duplicated.
Definition at line 1561 of file InstrTypes.h.
References llvm::Attribute::NoDuplicate.
Referenced by FoldCondBranchOnPHI().
|
inlinestatic |
Definition at line 1043 of file InstrTypes.h.
References llvm::MCID::Call, and llvm::Instruction::getOpcode().
Definition at line 1047 of file InstrTypes.h.
|
inlinestaticprotected |
Return the total number of values used in Bundles
.
Definition at line 1960 of file InstrTypes.h.
References B, llvm::AttributeList::FunctionIndex, and llvm::AttributeList::hasAttribute().
Return the number of operand bundles with the tag Name attached to this instruction.
Definition at line 1656 of file InstrTypes.h.
Referenced by getMemCmpLoad(), getOffsetFromIndices(), getParentPad(), and llvm::SelectionDAGBuilder::visitBitTestCase().
Return the number of operand bundles with the tag ID attached to this instruction.
Definition at line 1667 of file InstrTypes.h.
|
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 line 1065 of file InstrTypes.h.
Referenced by llvm::BasicAAResult::getModRefInfo().
|
inline |
Definition at line 1066 of file InstrTypes.h.
|
inline |
Definition at line 1083 of file InstrTypes.h.
|
inline |
Definition at line 1069 of file InstrTypes.h.
Referenced by llvm::BasicAAResult::getModRefInfo().
|
inline |
Definition at line 1074 of file InstrTypes.h.
|
inline |
Definition at line 1086 of file InstrTypes.h.
|
inline |
Definition at line 1077 of file InstrTypes.h.
References llvm::make_range().
|
inline |
Definition at line 1080 of file InstrTypes.h.
References llvm::make_range().
|
inline |
Return true if the data operand at index i
has the attribute A
.
Data operands include call arguments and values used in operand bundles, but does not include the callee operand. This routine dispatches to the underlying AttributeList or the OperandBundleUser as appropriate.
The index i
is interpreted as
i
== Attribute::ReturnIndex -> the return value i
in [1, arg_size + 1) -> argument number (i
- 1) i
in [arg_size + 1, data_operand_size + 1) -> bundle operand at index (i
- 1) in the operand list.
Definition at line 1376 of file InstrTypes.h.
References assert(), and llvm::AttributeList::ReturnIndex.
llvm::CallBase::DECLARE_TRANSPARENT_OPERAND_ACCESSORS | ( | Value | ) |
|
inline |
Determine if the call should not perform indirect branch tracking.
Definition at line 1552 of file InstrTypes.h.
References llvm::Attribute::NoCfCheck.
Referenced by computeBytesPoppedByCalleeForSRet(), and getMOVL().
Definition at line 1429 of file InstrTypes.h.
References llvm::Attribute::ReadNone.
Referenced by llvm::GlobalsAAResult::alias(), llvm::BasicAAResult::getModRefBehavior(), llvm::BasicAAResult::getModRefInfo(), getOffsetFromIndices(), getPow(), getSqrtCall(), llvm::CallInfo::insert(), isFuncOrArgAttr(), markTails(), and TypeSizeToSizeIndex().
|
inline |
Determine if the call does not access memory.
Definition at line 1497 of file InstrTypes.h.
References llvm::Attribute::ReadNone.
Determine whether this data operand is not captured.
Definition at line 1401 of file InstrTypes.h.
References llvm::Attribute::NoCapture.
Referenced by llvm::BasicAAResult::getModRefInfo().
Definition at line 1442 of file InstrTypes.h.
References llvm::Attribute::ReadNone, and llvm::Attribute::WriteOnly.
Referenced by llvm::BasicAAResult::getModRefBehavior(), and llvm::BasicAAResult::getModRefInfo().
|
inline |
Determine if the call does not access or only writes memory.
Definition at line 1511 of file InstrTypes.h.
References llvm::Attribute::WriteOnly.
|
inline |
Determine if the call cannot return.
Definition at line 1546 of file InstrTypes.h.
References llvm::Attribute::NoReturn.
|
inline |
Determine if the call cannot unwind.
Definition at line 1555 of file InstrTypes.h.
References llvm::Attribute::NoUnwind.
Referenced by HandleCallsInBlockInlinedThroughInvoke(), and llvm::InstCombiner::visitCallInst().
Definition at line 1135 of file InstrTypes.h.
References assert().
Referenced by llvm::GVN::ValueTable::add(), addIntrinsicToSummary(), addStackMapLiveVars(), llvm::slpvectorizer::BoUpSLP::canMapToVector(), canonicalizeConstantArg0ToArg1(), canonicalizeSaturatedSubtract(), canTransformToMemCmp(), computeArraySize(), computeKnownBitsFromAssume(), ComputePostOrders(), llvm::computeUsesVAFloatArgument(), createCallInst(), llvm::createEfficiencySanitizerPass(), llvm::createObjCARCOptPass(), CreatePrologue(), despeculateCountZeros(), eliminateRecursiveTailCall(), emitSignedInt64(), llvm::AlignmentFromAssumptionsPass::extractAlignmentInfo(), llvm::findDevirtualizableCallsForTypeCheckedLoad(), llvm::findDevirtualizableCallsForTypeTest(), findInitTrampoline(), findMatchingInlineAsmOperand(), llvm::AMDGPULibCalls::fold(), foldCtpop(), foldCttzCtlz(), foldICmpShlOne(), llvm::SITargetLowering::getAddrModeArguments(), llvm::VAStartInst::getArgList(), llvm::VAEndInst::getArgList(), llvm::getArgumentAliasingToReturnedPointer(), llvm::VACopyInst::getDest(), llvm::ConstrainedFPIntrinsic::getExceptionBehavior(), llvm::MemoryLocation::getForArgument(), llvm::InstrProfIncrementInst::getHash(), llvm::InstrProfValueProfileInst::getHash(), llvm::InstrProfIncrementInst::getIndex(), llvm::InstrProfValueProfileInst::getIndex(), llvm::MemIntrinsicBase< AnyMemIntrinsic >::getLength(), getMemCmpLoad(), llvm::InstrProfIncrementInst::getName(), llvm::InstrProfValueProfileInst::getName(), llvm::DOTGraphTraits< BoUpSLP * >::getNodeAttributes(), llvm::InstrProfIncrementInst::getNumCounters(), getOffsetFromIndices(), llvm::AArch64TTIImpl::getOrCreateResultFromMemIntrinsic(), getParentPad(), getPointerOperands(), getPow(), llvm::MemIntrinsicBase< AnyMemIntrinsic >::getRawDest(), llvm::AtomicMemIntrinsic::getRawElementSizeInBytes(), llvm::DbgVariableIntrinsic::getRawExpression(), llvm::DbgLabelInst::getRawLabel(), llvm::DbgVariableIntrinsic::getRawVariable(), llvm::ConstrainedFPIntrinsic::getRoundingMode(), getSqrtCall(), llvm::VACopyInst::getSrc(), llvm::InstrProfIncrementInst::getStep(), getSubprogram(), getSuccPad(), llvm::InstrProfValueProfileInst::getTargetValue(), llvm::RISCVTargetLowering::getTgtMemIntrinsic(), llvm::HexagonTargetLowering::getTgtMemIntrinsic(), llvm::AArch64TTIImpl::getTgtMemIntrinsic(), llvm::GCNTTIImpl::getTgtMemIntrinsic(), llvm::SITargetLowering::getTgtMemIntrinsic(), llvm::AArch64TargetLowering::getTgtMemIntrinsic(), llvm::NVPTXTargetLowering::getTgtMemIntrinsic(), llvm::ARMTargetLowering::getTgtMemIntrinsic(), llvm::PPCTargetLowering::getTgtMemIntrinsic(), llvm::X86TargetLowering::getTgtMemIntrinsic(), getUnderlyingArgReg(), getUniformBase(), llvm::InstrProfValueProfileInst::getValueKind(), llvm::DbgVariableIntrinsic::getVariableLocation(), llvm::MemIntrinsic::getVolatileCst(), handleBrSelExpect(), handleFree(), handlePhiDef(), handleSwitchExpect(), hasOnlySelectUsers(), haveSameOperands(), INITIALIZE_PASS(), llvm::AMDGPULibCalls::initNativeFuncs(), InsertRootInitializers(), insertSinCosCall(), InTreeUserNeedToExtract(), inversePermutation(), isDynamicConstant(), isFuncOrArgAttr(), isKnownTypeIdMember(), isLoadInvariantInLoop(), IsNonLocalValue(), isReportingError(), llvm::LibCallSimplifier::LibCallSimplifier(), llvm::log2(), lowerExpectIntrinsic(), LowerFPToInt(), llvm::IntrinsicLowering::LowerIntrinsicCall(), llvm::lowerObjectSizeCall(), llvm::IntrinsicLowering::LowerToByteSwap(), llvm::makeGuardControlFlowExplicit(), llvm::gvn::AvailableValueInBlock::MaterializeAdjustedValue(), optimizeBinaryDoubleFP(), optimizeDoubleFP(), OptimizeEmptyGlobalCXXDtors(), optimizeTrigReflections(), false::LibCallsShrinkWrap::perform(), PerformHeapAllocSRoA(), RedzoneSizeForScale(), ReplaceFPIntrinsicWithCall(), replaceUnaryCall(), reportLoadElim(), llvm::returnTypeIsEligibleForTailCall(), scalarizeMaskedGather(), scalarizeMaskedLoad(), scalarizeMaskedScatter(), scalarizeMaskedStore(), llvm::FastISel::selectGetElementPtr(), llvm::FastISel::selectIntrinsicCall(), llvm::FastISel::selectPatchpoint(), llvm::FastISel::selectXRayCustomEvent(), llvm::FastISel::selectXRayTypedEvent(), ShrinkDemandedConstant(), simplifyInvariantGroupIntrinsic(), simplifyMaskedGather(), simplifyMaskedLoad(), simplifyMaskedScatter(), simplifyMaskedStore(), simplifyNeonTbl1(), simplifyNeonVld1(), SimplifyNVVMIntrinsic(), simplifyX86immShift(), simplifyX86insertps(), simplifyX86movmsk(), simplifyX86pack(), simplifyX86pshufb(), simplifyX86round(), simplifyX86varShift(), simplifyX86vpcom(), simplifyX86vpermilvar(), simplifyX86vpermv(), AllocaSlices::SliceBuilder::SliceBuilder(), StripSymbolNames(), llvm::JumpThreadingPass::ThreadGuard(), tryToMoveFreeBeforeNullTest(), tryToOptimizeStoreOfMallocToGlobal(), turnGuardIntoBranch(), TypeSizeToSizeIndex(), llvm::AssumptionCache::updateAffectedValues(), upgradeAbs(), upgradeAVX512MaskToSelect(), upgradeIntMinMax(), upgradeMaskedCompare(), upgradeMaskedMove(), UpgradeMaskToInt(), upgradePMULDQ(), upgradeX86ConcatShift(), UpgradeX86MaskedShift(), upgradeX86Rotate(), UpgradeX86VPERMT2Intrinsics(), llvm::AMDGPULibCalls::useNative(), llvm::sroa::AllocaSliceRewriter::visit(), llvm::InstCombiner::visitCallInst(), llvm::InstCombiner::visitFree(), and X86ChooseCmpImmediateOpcode().
Wrappers for getting the Use
of a call argument.
Definition at line 1146 of file InstrTypes.h.
References assert(), and llvm::User::getOperandUse().
Referenced by llvm::MemIntrinsicBase< AnyMemIntrinsic >::getLengthUse(), and llvm::MemIntrinsicBase< AnyMemIntrinsic >::getRawDestUse().
Definition at line 1150 of file InstrTypes.h.
References assert(), and llvm::User::getOperandUse().
|
inline |
Get the attribute of a given kind at a position.
Definition at line 1342 of file InstrTypes.h.
References llvm::AttributeList::getAttribute(), and llvm::Intrinsic::getAttributes().
Get the attribute of a given kind at a position.
Definition at line 1347 of file InstrTypes.h.
References llvm::AttributeList::getAttribute(), and llvm::Intrinsic::getAttributes().
|
inline |
Return the parameter attributes for this call.
Definition at line 1244 of file InstrTypes.h.
References llvm::AMDGPU::HSAMD::Kernel::Key::Attrs.
Referenced by changeToCall(), llvm::changeToInvokeAndSplitBasicBlock(), llvm::CallInst::Create(), llvm::InvokeInst::Create(), emitSignedInt64(), getParameterABIAttributes(), getPow(), getSuccPad(), getUnderlyingArgReg(), llvm::InlineFunction(), isFuncOrArgAttr(), makeStatepointExplicitImpl(), and llvm::AMDGPULibCalls::useNative().
|
inline |
Return the index of the last bundle operand in the Use array.
Definition at line 1614 of file InstrTypes.h.
References assert().
Referenced by llvm::DOTGraphTraits< BoUpSLP * >::getNodeAttributes().
|
inline |
Return the index of the first bundle operand in the Use array.
Definition at line 1608 of file InstrTypes.h.
References assert().
Referenced by llvm::DOTGraphTraits< BoUpSLP * >::getNodeAttributes().
|
inline |
Return the BundleOpInfo 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 line 1950 of file InstrTypes.h.
References llvm_unreachable.
|
inline |
Returns the function called, or null if this is an indirect function invocation.
Definition at line 1181 of file InstrTypes.h.
Referenced by addIntrinsicToSummary(), canTransformToMemCmp(), CC_MipsO32_FP64(), llvm::IntrinsicInst::classof(), combineADDToADDZE(), computeBytesPoppedByCalleeForSRet(), computeKnownBitsFromAssume(), despeculateCountZeros(), llvm::findDevirtualizableCallsForTypeCheckedLoad(), llvm::findDevirtualizableCallsForTypeTest(), findTRECandidate(), llvm::AMDGPULibCalls::fold(), llvm::objcarc::GetARCInstKind(), llvm::MemoryLocation::getForArgument(), llvm::IntrinsicInst::getIntrinsicID(), getMemCmpLoad(), llvm::BasicAAResult::getModRefBehavior(), llvm::GlobalsAAResult::getModRefBehavior(), llvm::GlobalsAAResult::getModRefInfo(), getMOVL(), llvm::DOTGraphTraits< BoUpSLP * >::getNodeAttributes(), getOffsetFromIndices(), getParameterABIAttributes(), getParentPad(), getPow(), getScalarIntrinsicDeclaration(), getSqrtCall(), getSuccPad(), llvm::HexagonTargetLowering::getTgtMemIntrinsic(), llvm::ARMTargetLowering::getTgtMemIntrinsic(), getUniformBase(), getVectorCallCost(), handleBrSelExpect(), HandleCallsInBlockInlinedThroughInvoke(), handleSwitchExpect(), INITIALIZE_PASS(), llvm::InlineFunction(), InsertRootInitializers(), insertSinCosCall(), inversePermutation(), isFuncOrArgAttr(), isLocallyOpenedFile(), isReportingError(), isSafeToEliminateVarargsCast(), isWriteOnlyParam(), llvm::LibCallSimplifier::LibCallSimplifier(), llvm::log2(), lowerExpectIntrinsic(), llvm::IntrinsicLowering::LowerIntrinsicCall(), llvm::maybeMarkSanitizerLibraryCallNoBuiltin(), moveUp(), llvm::FortifiedLibCallSimplifier::optimizeCall(), llvm::LibCallSimplifier::optimizeCall(), optimizeDoubleFP(), optimizeTrigReflections(), false::LibCallsShrinkWrap::perform(), llvm::returnTypeIsEligibleForTailCall(), runPartiallyInlineLibCalls(), llvm::FastISel::selectStackmap(), setFastFlags(), ShrinkDemandedConstant(), TypeSizeToSizeIndex(), llvm::UpgradeIntrinsicCall(), llvm::AMDGPULibCalls::useNative(), llvm::InstCombiner::visitCallInst(), llvm::InstVisitor< ObjectSizeOffsetVisitor, SizeOffsetType >::visitInstruction(), and X86ChooseCmpImmediateOpcode().
|
inline |
Definition at line 1170 of file InstrTypes.h.
Definition at line 1176 of file InstrTypes.h.
Referenced by getParentPad().
|
inline |
Definition at line 1177 of file InstrTypes.h.
|
inline |
Definition at line 1174 of file InstrTypes.h.
Referenced by addStackMapLiveVars(), changeToCall(), llvm::changeToInvokeAndSplitBasicBlock(), llvm::computeUsesVAFloatArgument(), llvm::CallInst::Create(), llvm::InvokeInst::Create(), despeculateCountZeros(), emitSignedInt64(), llvm::ARMTargetLowering::ExpandInlineAsm(), llvm::X86TargetLowering::ExpandInlineAsm(), FindAllMemoryUses(), getComparePred(), getMemCmpLoad(), getOffsetFromIndices(), getSuccPad(), getUnderlyingArgReg(), HandleCallsInBlockInlinedThroughInvoke(), INITIALIZE_PASS(), llvm::InlineFunction(), llvm::FastISel::lowerCall(), llvm::FastISel::selectCall(), shouldConvertUse(), shouldFixMainFunction(), TypeSizeToSizeIndex(), and llvm::SelectionDAGBuilder::visitBitTestCase().
Function * CallBase::getCaller | ( | ) |
Helper to get the caller (the parent function).
Definition at line 258 of file Instructions.cpp.
References llvm::Instruction::getParent(), and llvm::BasicBlock::getParent().
Referenced by getParentPad().
Definition at line 1198 of file InstrTypes.h.
References getIntrinsicID().
|
inline |
Definition at line 1225 of file InstrTypes.h.
Referenced by changeToCall(), llvm::changeToInvokeAndSplitBasicBlock(), combineADDToADDZE(), llvm::CallInst::Create(), llvm::InvokeInst::Create(), llvm::CallInst::CreateFree(), emitSignedInt64(), getOffsetFromIndices(), getParameterABIAttributes(), llvm::InlineFunction(), isCallingConvCCompatible(), llvm::makeGuardControlFlowExplicit(), makeStatepointExplicitImpl(), populateBundleOperandInfos(), llvm::FastISel::selectPatchpoint(), llvm::FastISel::selectStackmap(), and turnToExplicitForm().
|
inline |
Extract the number of dereferenceable bytes for a call or parameter (0=unknown).
Definition at line 1457 of file InstrTypes.h.
References llvm::AttributeList::getDereferenceableBytes().
|
inline |
Extract the number of dereferenceable_or_null bytes for a call or parameter (0=unknown).
Definition at line 1463 of file InstrTypes.h.
References llvm::AttributeList::getDereferenceableOrNullBytes(), and isReturnNonNull().
|
inline |
Definition at line 1051 of file InstrTypes.h.
Referenced by emitSignedInt64(), getParameterABIAttributes(), getSuccPad(), llvm::InlineFunction(), and isCallingConvCCompatible().
Intrinsic::ID CallBase::getIntrinsicID | ( | ) | const |
Returns the intrinsic ID of the intrinsic called or Intrinsic::not_intrinsic if the called function is not an intrinsic, or if this is an indirect call.
Definition at line 270 of file Instructions.cpp.
References F(), getCalledFunction(), and llvm::Intrinsic::not_intrinsic.
Referenced by llvm::isIntrinsicReturningPointerAliasingArgumentWithoutCapturing().
|
inline |
Definition at line 1133 of file InstrTypes.h.
Referenced by llvm::GVN::ValueTable::add(), addStackMapLiveVars(), llvm::slpvectorizer::BoUpSLP::canMapToVector(), canonicalizeConstantArg0ToArg1(), CC_MipsO32_FP64(), llvm::computeUsesVAFloatArgument(), eliminateRecursiveTailCall(), emitSignedInt64(), llvm::AMDGPULibCalls::fold(), llvm::ConstrainedFPIntrinsic::getExceptionBehavior(), llvm::BasicAAResult::getModRefInfo(), llvm::DOTGraphTraits< BoUpSLP * >::getNodeAttributes(), llvm::AArch64TTIImpl::getOrCreateResultFromMemIntrinsic(), getParentPad(), llvm::ConstrainedFPIntrinsic::getRoundingMode(), getScalarIntrinsicDeclaration(), getSubprogram(), llvm::AArch64TTIImpl::getTgtMemIntrinsic(), llvm::AArch64TargetLowering::getTgtMemIntrinsic(), llvm::ARMTargetLowering::getTgtMemIntrinsic(), getUnderlyingArgReg(), getUniformBase(), haveSameOperands(), instrumentMaskedLoadOrStore(), inversePermutation(), isReportingError(), llvm::IntrinsicLowering::LowerToByteSwap(), llvm::gvn::AvailableValueInBlock::MaterializeAdjustedValue(), optimizeBinaryDoubleFP(), false::LibCallsShrinkWrap::perform(), llvm::FastISel::selectGetElementPtr(), llvm::FastISel::selectPatchpoint(), ShrinkDemandedConstant(), TypeSizeToSizeIndex(), upgradeAbs(), upgradeAVX512MaskToSelect(), upgradeIntMinMax(), upgradeMaskedCompare(), upgradePMULDQ(), UpgradeX86AddSubSatIntrinsics(), upgradeX86ConcatShift(), upgradeX86Rotate(), llvm::AMDGPULibCalls::useNative(), and X86ChooseCmpImmediateOpcode().
|
inline |
Return the number of operand bundles associated with this User.
Definition at line 1600 of file InstrTypes.h.
Referenced by llvm::createObjCARCOptPass(), getSuccPad(), and hasIdenticalOperandBundleSchema().
|
inlineprotected |
Definition at line 1030 of file InstrTypes.h.
References llvm::MCID::Call, llvm::Value::getContext(), getOpcode(), and llvm_unreachable.
|
inline |
Return the total number operands (not operand bundles) used by every operand bundle in this OperandBundleUser.
Definition at line 1637 of file InstrTypes.h.
|
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 line 1680 of file InstrTypes.h.
References assert(), llvm::OperandBundleUse::getTagName(), Name, and llvm::None.
Referenced by getParentPad(), HandleCallsInBlockInlinedThroughInvoke(), and llvm::makeGuardControlFlowExplicit().
|
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 line 1696 of file InstrTypes.h.
References assert(), llvm::OperandBundleUse::getTagID(), and llvm::None.
|
inline |
Return the operand bundle at a specific index.
Definition at line 1649 of file InstrTypes.h.
References assert().
Referenced by llvm::createObjCARCOptPass(), and getSuccPad().
|
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 line 1724 of file InstrTypes.h.
|
inline |
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-trivially different representations of operand bundles (see documentation above).
Definition at line 1715 of file InstrTypes.h.
References llvm::SmallVectorImpl< T >::emplace_back().
Referenced by changeToCall(), llvm::changeToInvokeAndSplitBasicBlock(), llvm::InlineFunction(), inversePermutation(), llvm::FortifiedLibCallSimplifier::optimizeCall(), llvm::LibCallSimplifier::optimizeCall(), PerformHeapAllocSRoA(), and tryToOptimizeStoreOfMallocToGlobal().
Extract the alignment for a call or parameter (0=unknown).
Definition at line 1451 of file InstrTypes.h.
References llvm::AttributeList::getParamAlignment().
Referenced by llvm::MemIntrinsicBase< AnyMemIntrinsic >::getDestAlignment().
|
inline |
Get the attribute of a given kind from a given arg.
Definition at line 1352 of file InstrTypes.h.
References assert(), llvm::Intrinsic::getAttributes(), and llvm::AttributeList::getParamAttr().
Get the attribute of a given kind from a given arg.
Definition at line 1358 of file InstrTypes.h.
References assert(), llvm::Intrinsic::getAttributes(), and llvm::AttributeList::getParamAttr().
|
inline |
Extract the alignment of the return value.
Definition at line 1448 of file InstrTypes.h.
References llvm::AttributeList::getRetAlignment().
Value * CallBase::getReturnedArgOperand | ( | ) | const |
If one of the arguments has the 'returned' attribute, returns its operand value.
Otherwise, return nullptr.
Definition at line 288 of file Instructions.cpp.
References llvm::AMDGPU::HSAMD::Kernel::Key::Attrs, F(), llvm::AttributeList::FirstArgIndex, getCalledFunction(), and llvm::Attribute::Returned.
Referenced by llvm::getArgumentAliasingToReturnedPointer().
Returns true if this CallSite passes the given Value* as an argument to the called function.
Definition at line 1166 of file InstrTypes.h.
References llvm::any_of(), and Arg.
|
inline |
Determine if any call argument is an aggregate passed by value.
Definition at line 1586 of file InstrTypes.h.
References llvm::Attribute::ByVal, and llvm::AttributeList::hasAttrSomewhere().
|
inline |
Return true if this operand bundle user has operand bundles that may write to the heap.
Definition at line 1739 of file InstrTypes.h.
References llvm::LLVMContext::OB_deopt, and llvm::LLVMContext::OB_funclet.
|
inlineprotected |
Definition at line 1028 of file InstrTypes.h.
References llvm::Value::HasDescriptor.
|
inline |
Determine whether this call has the given attribute.
Definition at line 1251 of file InstrTypes.h.
References assert(), and llvm::Attribute::NoBuiltin.
Referenced by computeBytesPoppedByCalleeForSRet(), despeculateCountZeros(), FindAllMemoryUses(), getMOVL(), insertSinCosCall(), and isTrigLibCall().
Determine whether this call has the given attribute.
Definition at line 1258 of file InstrTypes.h.
Return true if Other
has the same sequence of operand bundle tags with the same number of operands on each one of them as this OperandBundleUser.
Definition at line 1764 of file InstrTypes.h.
References bundle_op_info_begin(), llvm::lltok::equal, and getNumOperandBundles().
Referenced by llvm::DOTGraphTraits< BoUpSLP * >::getNodeAttributes().
|
inline |
Determine if there are is an inalloca argument.
Only the last argument can have the inalloca attribute.
Definition at line 1423 of file InstrTypes.h.
References llvm::Attribute::InAlloca.
Referenced by getSuccPad().
|
inline |
Return true if this User has any operand bundles.
Definition at line 1605 of file InstrTypes.h.
Referenced by emitSignedInt64(), llvm::BasicAAResult::getModRefBehavior(), llvm::GlobalsAAResult::getModRefBehavior(), llvm::DOTGraphTraits< BoUpSLP * >::getNodeAttributes(), and markTails().
Return true if this operand bundle user contains operand bundles with tags other than those specified in IDs
.
Definition at line 1774 of file InstrTypes.h.
References llvm::is_contained().
Referenced by getMemCmpLoad(), and llvm::SelectionDAGBuilder::visitBitTestCase().
|
inline |
Return true if this operand bundle user has operand bundles that may read from the heap.
Definition at line 1730 of file InstrTypes.h.
bool CallBase::hasRetAttr | ( | Attribute::AttrKind | Kind | ) | const |
Determine whether the return value has the given attribute.
Definition at line 301 of file Instructions.cpp.
References llvm::AMDGPU::HSAMD::Kernel::Key::Attrs, F(), getCalledFunction(), and llvm::AttributeList::ReturnIndex.
|
inline |
Determine if the call returns a structure through first pointer argument.
Definition at line 1577 of file InstrTypes.h.
References llvm::Attribute::StructRet.
Definition at line 1155 of file InstrTypes.h.
References assert().
|
inline |
Definition at line 1160 of file InstrTypes.h.
Return true if the operand at index Idx
is a bundle operand.
Definition at line 1620 of file InstrTypes.h.
Returns true if the use is a bundle operand.
Definition at line 1626 of file InstrTypes.h.
References assert().
|
inline |
Definition at line 1631 of file InstrTypes.h.
Determine whether this argument is passed by value.
Definition at line 1406 of file InstrTypes.h.
References llvm::Attribute::ByVal.
Referenced by llvm::BasicAAResult::getModRefInfo().
Determine whether this argument is passed by value or in an alloca.
Definition at line 1416 of file InstrTypes.h.
References llvm::Attribute::ByVal, and llvm::Attribute::InAlloca.
|
inline |
Determine whether the passed iterator points to the callee operand's Use.
Definition at line 1189 of file InstrTypes.h.
Referenced by analyzeGlobalAux().
Determine whether this Use is the callee operand's Use.
Definition at line 1194 of file InstrTypes.h.
|
inline |
Determine if the invoke is convergent.
Definition at line 1567 of file InstrTypes.h.
References llvm::Attribute::Convergent.
Referenced by FoldCondBranchOnPHI().
Definition at line 1090 of file InstrTypes.h.
References assert().
|
inline |
Definition at line 1095 of file InstrTypes.h.
Is the function attribute S disallowed by some operand bundle on this operand bundle user?
Definition at line 1785 of file InstrTypes.h.
|
inline |
Is the function attribute A disallowed by some operand bundle on this operand bundle user?
Definition at line 1793 of file InstrTypes.h.
References llvm::Attribute::ArgMemOnly, llvm::Attribute::InaccessibleMemOnly, llvm::Attribute::InaccessibleMemOrArgMemOnly, llvm_unreachable, llvm::Attribute::ReadNone, and llvm::Attribute::ReadOnly.
Determine whether this argument is passed in an alloca.
Definition at line 1411 of file InstrTypes.h.
References llvm::Attribute::InAlloca.
bool CallBase::isIndirectCall | ( | ) | const |
Return true if the callsite is an indirect call.
Definition at line 260 of file Instructions.cpp.
Referenced by llvm::PGOIndirectCallVisitor::visitCallBase().
|
inline |
Return true if the call should not be treated as a call to a builtin.
Definition at line 1483 of file InstrTypes.h.
References llvm::Attribute::Builtin, and llvm::Attribute::NoBuiltin.
Referenced by getMemCmpLoad(), getVectorCallCost(), llvm::LibCallSimplifier::optimizeCall(), false::LibCallsShrinkWrap::perform(), and runPartiallyInlineLibCalls().
|
inline |
Return true if the call should not be inlined.
Definition at line 1492 of file InstrTypes.h.
References llvm::Attribute::NoInline.
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 line 276 of file Instructions.cpp.
References llvm::AllocaInst::getType(), llvm::Attribute::NonNull, llvm::NullPointerIsDefined(), and llvm::AttributeList::ReturnIndex.
|
inline |
Determine if the call requires strict floating point semantics.
Definition at line 1489 of file InstrTypes.h.
References llvm::Attribute::StrictFP.
Referenced by getMemCmpLoad(), and isReportingError().
|
inline |
Definition at line 1053 of file InstrTypes.h.
References DECLARE_TRANSPARENT_OPERAND_ACCESSORS, llvm::FunctionType::getReturnType(), and llvm::Value::mutateType().
|
inline |
Determine if the call can access memmory only using pointers based on its arguments.
Definition at line 1520 of file InstrTypes.h.
References llvm::Attribute::ArgMemOnly.
Referenced by llvm::BasicAAResult::getModRefBehavior(), and isFuncOrArgAttr().
|
inline |
Determine if the function may only access memory that is either inaccessible from the IR or pointed to by its arguments.
Definition at line 1538 of file InstrTypes.h.
References llvm::Attribute::InaccessibleMemOrArgMemOnly.
Referenced by llvm::BasicAAResult::getModRefBehavior().
|
inline |
Determine if the function may only access memory that is inaccessible from the IR.
Definition at line 1529 of file InstrTypes.h.
References llvm::Attribute::InaccessibleMemOnly.
Referenced by llvm::BasicAAResult::getModRefBehavior().
Definition at line 1435 of file InstrTypes.h.
References llvm::Attribute::ReadNone, and llvm::Attribute::ReadOnly.
Referenced by llvm::GlobalsAAResult::alias(), llvm::GVNExpression::Expression::dump(), getMemCmpLoad(), llvm::BasicAAResult::getModRefBehavior(), llvm::BasicAAResult::getModRefInfo(), llvm::DenseMapInfo< SimpleValue >::getTombstoneKey(), llvm::CallInfo::insert(), isFuncOrArgAttr(), optimizeSQRT(), and TypeSizeToSizeIndex().
|
inline |
Determine if the call does not access or only reads memory.
Definition at line 1503 of file InstrTypes.h.
References llvm::Attribute::ReadOnly.
|
inline |
Simple helper function to map a BundleOpInfo to an OperandBundleUse.
Definition at line 1840 of file InstrTypes.h.
References llvm::sys::path::begin(), llvm::CallBase::BundleOpInfo::Begin, llvm::CallBase::BundleOpInfo::End, and llvm::CallBase::BundleOpInfo::Tag.
bool CallBase::paramHasAttr | ( | unsigned | ArgNo, |
Attribute::AttrKind | Kind | ||
) | const |
Determine whether the argument or parameter has the given attribute.
Definition at line 312 of file Instructions.cpp.
References assert(), llvm::AMDGPU::HSAMD::Kernel::Key::Attrs, F(), llvm::AttributeList::FunctionIndex, getCalledFunction(), and Kind.
Referenced by llvm::BasicAAResult::getArgModRefInfo(), getSuccPad(), isContiguous(), and isWriteOnlyParam().
CallBase::op_iterator CallBase::populateBundleOperandInfos | ( | ArrayRef< OperandBundleDef > | Bundles, |
const unsigned | BeginIndex | ||
) |
Populate the BundleOpInfo instances and the Use& vector from Bundles
.
Return the op_iterator pointing to the Use& one past the last last bundle operand use.
Each OperandBundleDef
instance is tracked by a OperandBundleInfo instance allocated in this User's descriptor.
Definition at line 335 of file Instructions.cpp.
References llvm::AMDGPU::HSAMD::Kernel::Key::Args, assert(), Attrs, B, bundle_op_info_begin(), bundle_op_info_end(), llvm::MCID::Call, llvm::copy(), FTy, getCallingConv(), llvm::Value::getContext(), llvm::User::getNumOperands(), llvm::FunctionType::getNumParams(), llvm::FunctionType::getParamType(), llvm::FunctionType::getReturnType(), llvm::CallInst::getTailCallKind(), llvm::Value::getType(), llvm::cl::init(), llvm::FunctionType::isVarArg(), Name, llvm::User::op_begin(), llvm::User::op_end(), llvm::LLVMContext::pImpl, llvm::Value::setName(), llvm::ArrayRef< T >::size(), and llvm::Value::SubclassOptionalData.
|
inline |
removes the attribute from the list of attributes.
Definition at line 1291 of file InstrTypes.h.
References llvm::Intrinsic::getAttributes(), and llvm::AttributeList::removeAttribute().
removes the attribute from the list of attributes.
Definition at line 1298 of file InstrTypes.h.
References llvm::Intrinsic::getAttributes(), and llvm::AttributeList::removeAttribute().
|
inline |
Removes the attribute from the given argument.
Definition at line 1305 of file InstrTypes.h.
References assert(), llvm::Intrinsic::getAttributes(), and llvm::AttributeList::removeParamAttribute().
Referenced by llvm::MemIntrinsicBase< AnyMemIntrinsic >::setDestAlignment().
Removes the attribute from the given argument.
Definition at line 1313 of file InstrTypes.h.
References assert(), llvm::Intrinsic::getAttributes(), and llvm::AttributeList::removeParamAttribute().
|
inline |
Determine if the return value is marked with NoAlias attribute.
Definition at line 1473 of file InstrTypes.h.
References llvm::AttributeList::hasAttribute(), llvm::Attribute::NoAlias, and llvm::AttributeList::ReturnIndex.
Definition at line 1140 of file InstrTypes.h.
References assert().
Referenced by canonicalizeConstantArg0ToArg1(), canonicalizeSaturatedSubtract(), createCoroSave(), llvm::createObjCARCOptPass(), despeculateCountZeros(), getPointerOperands(), llvm::MemIntrinsicBase< AnyMemIntrinsic >::setDest(), llvm::AtomicMemIntrinsic::setElementSizeInBytes(), llvm::MemIntrinsicBase< AnyMemIntrinsic >::setLength(), llvm::MemIntrinsic::setVolatile(), ShrinkDemandedConstant(), turnGuardIntoBranch(), llvm::InstCombiner::visitCallInst(), and llvm::InstCombiner::visitFMul().
|
inline |
Set the parameter attributes for this call.
Definition at line 1248 of file InstrTypes.h.
Referenced by changeToCall(), llvm::changeToInvokeAndSplitBasicBlock(), CreatePrologue(), llvm::emitBinaryFloatFnCall(), emitUnaryFloatFnCallHelper(), FunctionNumber(), GetRMWLibcall(), getSignature(), INITIALIZE_PASS(), llvm::InlineFunction(), isThunkProfitable(), makeStatepointExplicitImpl(), llvm::orc::makeStub(), and llvm::AMDGPULibCalls::useNative().
|
inline |
Sets the function called, including updating the function type.
Definition at line 1210 of file InstrTypes.h.
References llvm::Value::getType().
Referenced by llvm::createObjCARCOptPass(), llvm::AMDGPULibCalls::fold(), getPointerOperands(), hasUndefContents(), isReportingError(), llvm::AMDGPULibCalls::useNative(), and llvm::InstCombiner::visitCallInst().
|
inline |
Sets the function called, including updating to the specified function type.
Definition at line 1218 of file InstrTypes.h.
References assert(), and llvm::Value::getType().
|
inline |
Definition at line 1207 of file InstrTypes.h.
|
inline |
Definition at line 1229 of file InstrTypes.h.
References assert(), and llvm::CallingConv::MaxID.
Referenced by changeToCall(), llvm::changeToInvokeAndSplitBasicBlock(), llvm::InvokeInst::Create(), llvm::createDwarfEHPass(), createFree(), CreateGCRelocates(), createMalloc(), CreatePrologue(), llvm::emitBinaryFloatFnCall(), llvm::emitCalloc(), llvm::emitFGetCUnlocked(), llvm::emitFGetSUnlocked(), llvm::emitFPutC(), llvm::emitFPutCUnlocked(), llvm::emitFPutS(), llvm::emitFPutSUnlocked(), llvm::emitFReadUnlocked(), llvm::emitFWrite(), llvm::emitFWriteUnlocked(), llvm::emitMalloc(), llvm::emitMemChr(), llvm::emitMemCmp(), llvm::emitMemCpyChk(), llvm::emitPutChar(), llvm::emitPutS(), llvm::emitStrChr(), llvm::emitStrCpy(), llvm::emitStrLen(), llvm::emitStrNCmp(), llvm::emitStrNCpy(), emitUnaryFloatFnCallHelper(), FunctionNumber(), getSignature(), getSqrtCall(), INITIALIZE_PASS(), llvm::InlineFunction(), isThunkProfitable(), and makeStatepointExplicitImpl().
|
inline |
Definition at line 1562 of file InstrTypes.h.
References llvm::AttributeList::FunctionIndex, and llvm::Attribute::NoDuplicate.
|
inline |
Definition at line 1568 of file InstrTypes.h.
References llvm::Attribute::Convergent, and llvm::AttributeList::FunctionIndex.
|
inline |
Definition at line 1498 of file InstrTypes.h.
References llvm::AttributeList::FunctionIndex, and llvm::Attribute::ReadNone.
|
inline |
Definition at line 1514 of file InstrTypes.h.
References llvm::AttributeList::FunctionIndex, and llvm::Attribute::WriteOnly.
|
inline |
Definition at line 1547 of file InstrTypes.h.
References llvm::AttributeList::FunctionIndex, and llvm::Attribute::NoReturn.
Referenced by addBoundsChecking().
|
inline |
Definition at line 1556 of file InstrTypes.h.
References llvm::AttributeList::FunctionIndex, and llvm::Attribute::NoUnwind.
Referenced by ComputePostOrders(), createCallInst(), eraseDeadBBsAndChildren(), llvm::InlineFunction(), MarkBlocksLiveIn(), and llvm::InstCombiner::visitCallInst().
|
inline |
Definition at line 1493 of file InstrTypes.h.
References llvm::AttributeList::FunctionIndex, and llvm::Attribute::NoInline.
|
inline |
Definition at line 1571 of file InstrTypes.h.
References llvm::Attribute::Convergent, and llvm::AttributeList::FunctionIndex.
|
inline |
Definition at line 1523 of file InstrTypes.h.
References llvm::Attribute::ArgMemOnly, and llvm::AttributeList::FunctionIndex.
|
inline |
Definition at line 1541 of file InstrTypes.h.
References llvm::AttributeList::FunctionIndex, and llvm::Attribute::InaccessibleMemOrArgMemOnly.
|
inline |
Definition at line 1532 of file InstrTypes.h.
References llvm::AttributeList::FunctionIndex, and llvm::Attribute::InaccessibleMemOnly.
|
inline |
Definition at line 1506 of file InstrTypes.h.
References llvm::AttributeList::FunctionIndex, and llvm::Attribute::ReadOnly.
|
protected |
parameter attributes for callable
Definition at line 1019 of file InstrTypes.h.
Referenced by llvm::CallInst::CreateFree(), and populateBundleOperandInfos().
|
staticprotected |
The last operand is the called operand.
Definition at line 1017 of file InstrTypes.h.
|
protected |
Definition at line 1020 of file InstrTypes.h.
Referenced by llvm::CallInst::CreateFree(), and populateBundleOperandInfos().