class CallBase

Declaration

class CallBase : public Instruction { /* full declaration omitted */ };

Description

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: - Zero or more arguments to the call, - Zero or more operand bundles with zero or more operand inputs each bundle, - Zero or more subclass controlled operands - The called function. 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.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1174

Inherits from: Instruction

Member Variables

protected llvm::AttributeList Attrs
parameter attributes for callable
protected llvm::FunctionType* FTy
protected static const int CalledOperandOpEndIdx = -1
The last operand is the called operand.

Inherited from Value:

protected SubclassOptionalData
protected NumUserOperands
protected IsUsedByMD
protected HasName
protected HasMetadata
protected HasHungOffUses
protected HasDescriptor
public static MaxAlignmentExponent = 32
public static MaximumAlignment = 1ULL << MaxAlignmentExponent

Method Overview

Inherited from Instruction:

Inherited from User:

Inherited from Value:

Methods

template <class... ArgsTy>
CallBase(const llvm::AttributeList& A,
         llvm::FunctionType* FT,
         ArgsTy&&... Args)

Declared at: llvm/include/llvm/IR/InstrTypes.h:1192

Templates

ArgsTy

Parameters

const llvm::AttributeList& A
llvm::FunctionType* FT
ArgsTy&&... Args

static unsigned int CountBundleInputs(
    ArrayRef<llvm::OperandBundleDef> Bundles)

Description

Return the total number of values used in \p Bundles.

Declared at: llvm/include/llvm/IR/InstrTypes.h:2301

Parameters

ArrayRef<llvm::OperandBundleDef> Bundles

static llvm::CallBase* Create(
    llvm::CallBase* CB,
    ArrayRef<llvm::OperandBundleDef> Bundles,
    llvm::Instruction* InsertPt = nullptr)

Description

Create a clone of \p CB with a different set of operand bundles and insert it before \p InsertPt. The returned call instruction is identical \p CB in every way except that the operand bundles for the new instruction are set to the operand bundles in \p Bundles.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1224

Parameters

llvm::CallBase* CB
ArrayRef<llvm::OperandBundleDef> Bundles
llvm::Instruction* InsertPt = nullptr

static llvm::CallBase* Create(
    llvm::CallBase* CB,
    llvm::OperandBundleDef Bundle,
    llvm::Instruction* InsertPt = nullptr)

Description

Create a clone of \p CB with the operand bundle with the tag matching\p Bundle's tag replaced with Bundle, and insert it before \p InsertPt. The returned call instruction is identical \p CI in every way except that the specified operand bundle has been replaced.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1232

Parameters

llvm::CallBase* CB
llvm::OperandBundleDef Bundle
llvm::Instruction* InsertPt = nullptr

void addAttributeAtIndex(unsigned int i,
                         llvm::Attribute Attr)

Description

adds the attribute to the list of attributes.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1501

Parameters

unsigned int i
llvm::Attribute Attr

void addAttributeAtIndex(unsigned int i,
                         Attribute::AttrKind Kind)

Description

adds the attribute to the list of attributes.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1496

Parameters

unsigned int i
Attribute::AttrKind Kind

void addDereferenceableParamAttr(unsigned int i,
                                 uint64_t Bytes)

Description

adds the dereferenceable attribute to the list of attributes.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1585

Parameters

unsigned int i
uint64_t Bytes

void addDereferenceableRetAttr(uint64_t Bytes)

Description

adds the dereferenceable attribute to the list of attributes.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1590

Parameters

uint64_t Bytes

void addFnAttr(llvm::Attribute Attr)

Description

Adds the attribute to the function.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1511

Parameters

llvm::Attribute Attr

void addFnAttr(Attribute::AttrKind Kind)

Description

Adds the attribute to the function.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1506

Parameters

Attribute::AttrKind Kind

static llvm::CallBase* addOperandBundle(
    llvm::CallBase* CB,
    uint32_t ID,
    llvm::OperandBundleDef OB,
    llvm::Instruction* InsertPt = nullptr)

Description

Create a clone of \p CB with operand bundle \p OB added.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1237

Parameters

llvm::CallBase* CB
uint32_t ID
llvm::OperandBundleDef OB
llvm::Instruction* InsertPt = nullptr

void addParamAttr(unsigned int ArgNo,
                  Attribute::AttrKind Kind)

Description

Adds the attribute to the indicated argument

Declared at: llvm/include/llvm/IR/InstrTypes.h:1526

Parameters

unsigned int ArgNo
Attribute::AttrKind Kind

void addParamAttr(unsigned int ArgNo,
                  llvm::Attribute Attr)

Description

Adds the attribute to the indicated argument

Declared at: llvm/include/llvm/IR/InstrTypes.h:1532

Parameters

unsigned int ArgNo
llvm::Attribute Attr

void addRetAttr(Attribute::AttrKind Kind)

Description

Adds the attribute to the return value.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1516

Parameters

Attribute::AttrKind Kind

void addRetAttr(llvm::Attribute Attr)

Description

Adds the attribute to the return value.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1521

Parameters

llvm::Attribute Attr

User::op_iterator arg_begin()

Description

Return the iterator pointing to the beginning of the argument list.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1316

User::const_op_iterator arg_begin() const

Declared at: llvm/include/llvm/IR/InstrTypes.h:1317

bool arg_empty() const

Declared at: llvm/include/llvm/IR/InstrTypes.h:1338

User::op_iterator arg_end()

Description

Return the iterator pointing to the end of the argument list.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1322

User::const_op_iterator arg_end() const

Declared at: llvm/include/llvm/IR/InstrTypes.h:1327

unsigned int arg_size() const

Declared at: llvm/include/llvm/IR/InstrTypes.h:1339

iterator_range<User::op_iterator> args()

Description

Iteration adapter for range-for loops.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1332

iterator_range<User::const_op_iterator> args()
    const

Declared at: llvm/include/llvm/IR/InstrTypes.h:1335

bool bundleOperandHasAttr(
    unsigned int OpIdx,
    Attribute::AttrKind A) const

Description

Return true if the bundle operand at index \p OpIdx has the attribute \p A.

Declared at: llvm/include/llvm/IR/InstrTypes.h:2095

Parameters

unsigned int OpIdx
Attribute::AttrKind A

llvm::CallBase::bundle_op_iterator
bundle_op_info_begin()

Description

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.

Declared at: llvm/include/llvm/IR/InstrTypes.h:2238

llvm::CallBase::const_bundle_op_iterator
bundle_op_info_begin() const

Description

Return the start of the list of BundleOpInfo instances associated with this OperandBundleUser.

Declared at: llvm/include/llvm/IR/InstrTypes.h:2248

llvm::CallBase::bundle_op_iterator
bundle_op_info_end()

Description

Return the end of the list of BundleOpInfo instances associated with this OperandBundleUser.

Declared at: llvm/include/llvm/IR/InstrTypes.h:2255

llvm::CallBase::const_bundle_op_iterator
bundle_op_info_end() const

Description

Return the end of the list of BundleOpInfo instances associated with this OperandBundleUser.

Declared at: llvm/include/llvm/IR/InstrTypes.h:2265

iterator_range<llvm::CallBase::bundle_op_iterator>
bundle_op_infos()

Description

Return the range [\p bundle_op_info_begin, \p bundle_op_info_end).

Declared at: llvm/include/llvm/IR/InstrTypes.h:2271

iterator_range<
    llvm::CallBase::const_bundle_op_iterator>
bundle_op_infos() const

Description

Return the range [\p bundle_op_info_begin, \p bundle_op_info_end).

Declared at: llvm/include/llvm/IR/InstrTypes.h:2276

bool cannotDuplicate() const

Description

Determine if the invoke cannot be duplicated.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1903

bool cannotMerge() const

Description

Determine if the call cannot be tail merged.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1907

static bool classof(const llvm::Instruction* I)

Declared at: llvm/include/llvm/IR/InstrTypes.h:1245

Parameters

const llvm::Instruction* I

static bool classof(const llvm::Value* V)

Declared at: llvm/include/llvm/IR/InstrTypes.h:1250

Parameters

const llvm::Value* V

unsigned int countOperandBundlesOfType(
    uint32_t ID) const

Description

Return the number of operand bundles with the tag ID attached to this instruction.

Declared at: llvm/include/llvm/IR/InstrTypes.h:2014

Parameters

uint32_t ID

unsigned int countOperandBundlesOfType(
    llvm::StringRef Name) const

Description

Return the number of operand bundles with the tag Name attached to this instruction.

Declared at: llvm/include/llvm/IR/InstrTypes.h:2003

Parameters

llvm::StringRef Name

bool dataOperandHasImpliedAttr(
    unsigned int i,
    Attribute::AttrKind Kind) const

Description

Return true if the data operand at index \p i has the attribute \p A. Data operands include call arguments and values used in operand bundles, but does not include the callee operand. The index \p i is interpreted as \p i in [0, arg_size) -> argument number (\p i) \p i in [arg_size, data_operand_size) -> bundle operand at index (\p i) in the operand list.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1653

Parameters

unsigned int i
Attribute::AttrKind Kind

User::op_iterator data_operands_begin()

Description

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.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1268

User::const_op_iterator data_operands_begin()
    const

Declared at: llvm/include/llvm/IR/InstrTypes.h:1269

bool data_operands_empty() const

Declared at: llvm/include/llvm/IR/InstrTypes.h:1286

User::op_iterator data_operands_end()

Declared at: llvm/include/llvm/IR/InstrTypes.h:1272

User::const_op_iterator data_operands_end() const

Declared at: llvm/include/llvm/IR/InstrTypes.h:1277

unsigned int data_operands_size() const

Declared at: llvm/include/llvm/IR/InstrTypes.h:1289

iterator_range<User::op_iterator> data_ops()

Declared at: llvm/include/llvm/IR/InstrTypes.h:1280

iterator_range<User::const_op_iterator> data_ops()
    const

Declared at: llvm/include/llvm/IR/InstrTypes.h:1283

bool doesNoCfCheck() const

Description

Determine if the call should not perform indirect branch tracking.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1896

bool doesNotAccessMemory(unsigned int OpNo) const

Declared at: llvm/include/llvm/IR/InstrTypes.h:1714

Parameters

unsigned int OpNo

bool doesNotAccessMemory() const

Description

Determine if the call does not access memory.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1851

bool doesNotCapture(unsigned int OpNo) const

Description

Determine whether this data operand is not captured.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1673

Parameters

unsigned int OpNo

bool doesNotReturn() const

Description

Determine if the call cannot return.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1892

bool doesNotThrow() const

Description

Determine if the call cannot unwind.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1899

llvm::Value* getArgOperand(unsigned int i) const

Declared at: llvm/include/llvm/IR/InstrTypes.h:1341

Parameters

unsigned int i

unsigned int getArgOperandNo(
    const llvm::Use* U) const

Description

Given a use for a arg operand, get the arg operand number that corresponds to it.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1372

Parameters

const llvm::Use* U

unsigned int getArgOperandNo(
    Value::const_user_iterator UI) const

Description

Given a value use iterator, return the arg operand number corresponding to it. Iterator must actually correspond to a data operand.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1379

Parameters

Value::const_user_iterator UI

llvm::Use& getArgOperandUse(unsigned int i)

Declared at: llvm/include/llvm/IR/InstrTypes.h:1356

Parameters

unsigned int i

const llvm::Use& getArgOperandUse(
    unsigned int i) const

Description

Wrappers for getting the \c Use of a call argument.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1352

Parameters

unsigned int i

llvm::Value* getArgOperandWithAttribute(
    Attribute::AttrKind Kind) const

Description

If one of the arguments has the specified attribute, returns its operand value. Otherwise, return nullptr.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1835

Parameters

Attribute::AttrKind Kind

llvm::Attribute getAttributeAtIndex(
    unsigned int i,
    llvm::StringRef Kind) const

Description

Get the attribute of a given kind at a position.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1610

Parameters

unsigned int i
llvm::StringRef Kind

llvm::Attribute getAttributeAtIndex(
    unsigned int i,
    Attribute::AttrKind Kind) const

Description

Get the attribute of a given kind at a position.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1605

Parameters

unsigned int i
Attribute::AttrKind Kind

llvm::AttributeList getAttributes() const

Description

Return the parameter attributes for this call.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1474

const llvm::CallBase::BundleOpInfo&
getBundleOpInfoForOperand(
    unsigned int OpIdx) const

Declared at: llvm/include/llvm/IR/InstrTypes.h:2295

Parameters

unsigned int OpIdx

llvm::CallBase::BundleOpInfo&
getBundleOpInfoForOperand(unsigned int OpIdx)

Description

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.

Declared at: llvm/include/llvm/IR/InstrTypes.h:2294

Parameters

unsigned int OpIdx

unsigned int getBundleOperandsEndIndex() const

Description

Return the index of the last bundle operand in the Use array.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1954

unsigned int getBundleOperandsStartIndex() const

Description

Return the index of the first bundle operand in the Use array.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1948

llvm::Function* getCalledFunction() const

Description

Returns the function called, or null if this is an indirect function invocation or the function signature does not match the call signature.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1396

llvm::Value* getCalledOperand() const

Declared at: llvm/include/llvm/IR/InstrTypes.h:1389

const llvm::Use& getCalledOperandUse() const

Declared at: llvm/include/llvm/IR/InstrTypes.h:1391

llvm::Use& getCalledOperandUse()

Declared at: llvm/include/llvm/IR/InstrTypes.h:1392

const llvm::Function* getCaller() const

Declared at: llvm/include/llvm/IR/InstrTypes.h:1416

llvm::Function* getCaller()

Description

Helper to get the caller (the parent function).

Declared at: llvm/include/llvm/IR/InstrTypes.h:1415

CallingConv::ID getCallingConv() const

Declared at: llvm/include/llvm/IR/InstrTypes.h:1455

unsigned int getDataOperandNo(
    const llvm::Use* U) const

Description

Given a use for a data operand, get the data operand number that corresponds to it.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1310

Parameters

const llvm::Use* U

unsigned int getDataOperandNo(
    Value::const_user_iterator UI) const

Description

Given a value use iterator, return the data operand corresponding to it. Iterator must actually correspond to a data operand.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1304

Parameters

Value::const_user_iterator UI

llvm::Attribute getFnAttr(
    Attribute::AttrKind Kind) const

Description

Get the attribute of a given kind for the function.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1623

Parameters

Attribute::AttrKind Kind

llvm::Attribute getFnAttr(
    llvm::StringRef Kind) const

Description

Get the attribute of a given kind for the function.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1615

Parameters

llvm::StringRef Kind

template <typename AK>
llvm::Attribute getFnAttrOnCalledFunction(
    AK Kind) const

Declared at: llvm/include/llvm/IR/InstrTypes.h:2326

Templates

AK

Parameters

AK Kind

llvm::FunctionType* getFunctionType() const

Declared at: llvm/include/llvm/IR/InstrTypes.h:1254

Intrinsic::ID getIntrinsicID() const

Description

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.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1430

unsigned int getNumOperandBundles() const

Description

Return the number of operand bundles associated with this User.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1940

unsigned int getNumSubclassExtraOperands() const

Declared at: llvm/include/llvm/IR/InstrTypes.h:1199

unsigned int getNumSubclassExtraOperandsDynamic()
    const

Description

Get the number of extra operands for instructions that don't have a fixed number of extra operands.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1213

unsigned int getNumTotalBundleOperands() const

Description

Return the total number operands (not operand bundles) used by every operand bundle in this OperandBundleUser.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1984

Optional<llvm::OperandBundleUse> getOperandBundle(
    llvm::StringRef Name) const

Description

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.

Declared at: llvm/include/llvm/IR/InstrTypes.h:2027

Parameters

llvm::StringRef Name

Optional<llvm::OperandBundleUse> getOperandBundle(
    uint32_t ID) const

Description

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.

Declared at: llvm/include/llvm/IR/InstrTypes.h:2043

Parameters

uint32_t ID

llvm::OperandBundleUse getOperandBundleAt(
    unsigned int Index) const

Description

Return the operand bundle at a specific index.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1996

Parameters

unsigned int Index

llvm::OperandBundleUse getOperandBundleForOperand(
    unsigned int OpIdx) const

Description

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.

Declared at: llvm/include/llvm/IR/InstrTypes.h:2068

Parameters

unsigned int OpIdx

void getOperandBundlesAsDefs(
    SmallVectorImpl<llvm::OperandBundleDef>& Defs)
    const

Description

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).

Declared at: llvm/include/llvm/IR/InstrTypes.h:2062

Parameters

SmallVectorImpl<llvm::OperandBundleDef>& Defs

llvm::MaybeAlign getParamAlign(
    unsigned int ArgNo) const

Description

Extract the alignment for a call or parameter (0=unknown).

Declared at: llvm/include/llvm/IR/InstrTypes.h:1742

Parameters

unsigned int ArgNo

llvm::Attribute getParamAttr(
    unsigned int ArgNo,
    Attribute::AttrKind Kind) const

Description

Get the attribute of a given kind from a given arg

Declared at: llvm/include/llvm/IR/InstrTypes.h:1631

Parameters

unsigned int ArgNo
Attribute::AttrKind Kind

llvm::Attribute getParamAttr(
    unsigned int ArgNo,
    llvm::StringRef Kind) const

Description

Get the attribute of a given kind from a given arg

Declared at: llvm/include/llvm/IR/InstrTypes.h:1637

Parameters

unsigned int ArgNo
llvm::StringRef Kind

llvm::Type* getParamByValType(
    unsigned int ArgNo) const

Description

Extract the byval type for a call or parameter.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1751

Parameters

unsigned int ArgNo

uint64_t getParamDereferenceableBytes(
    unsigned int i) const

Description

Extract the number of dereferenceable bytes for a call or parameter (0=unknown).

Declared at: llvm/include/llvm/IR/InstrTypes.h:1801

Parameters

unsigned int i

uint64_t getParamDereferenceableOrNullBytes(
    unsigned int i) const

Description

Extract the number of dereferenceable_or_null bytes for a parameter (0=unknown).

Declared at: llvm/include/llvm/IR/InstrTypes.h:1813

Parameters

unsigned int i

llvm::Type* getParamElementType(
    unsigned int ArgNo) const

Description

Extract the elementtype type for a parameter. Note that elementtype() can only be applied to call arguments, not function declaration parameters.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1789

Parameters

unsigned int ArgNo

llvm::Type* getParamInAllocaType(
    unsigned int ArgNo) const

Description

Extract the inalloca type for a call or parameter.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1769

Parameters

unsigned int ArgNo

llvm::Type* getParamPreallocatedType(
    unsigned int ArgNo) const

Description

Extract the preallocated type for a call or parameter.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1760

Parameters

unsigned int ArgNo

llvm::MaybeAlign getParamStackAlign(
    unsigned int ArgNo) const

Declared at: llvm/include/llvm/IR/InstrTypes.h:1746

Parameters

unsigned int ArgNo

llvm::Type* getParamStructRetType(
    unsigned int ArgNo) const

Description

Extract the sret type for a call or parameter.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1778

Parameters

unsigned int ArgNo

llvm::MaybeAlign getRetAlign() const

Description

Extract the alignment of the return value.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1733

uint64_t getRetDereferenceableBytes() const

Description

Extract the number of dereferenceable bytes for a call or parameter (0=unknown).

Declared at: llvm/include/llvm/IR/InstrTypes.h:1795

uint64_t getRetDereferenceableOrNullBytes() const

Description

Extract the number of dereferenceable_or_null bytes for a call (0=unknown).

Declared at: llvm/include/llvm/IR/InstrTypes.h:1807

llvm::Value* getReturnedArgOperand() const

Description

If one of the arguments has the 'returned' attribute, returns its operand value. Otherwise, return nullptr.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1829

bool hasArgument(const llvm::Value* V) const

Description

Returns true if this CallSite passes the given Value* as an argument to the called function.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1385

Parameters

const llvm::Value* V

bool hasByValArgument() const

Description

Determine if any call argument is an aggregate passed by value.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1926

bool hasClobberingOperandBundles() const

Description

Return true if this operand bundle user has operand bundles that may write to the heap.

Declared at: llvm/include/llvm/IR/InstrTypes.h:2078

bool hasDescriptor() const

Declared at: llvm/include/llvm/IR/InstrTypes.h:1197

bool hasFnAttr(llvm::StringRef Kind) const

Description

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.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1492

Parameters

llvm::StringRef Kind

bool hasFnAttr(Attribute::AttrKind Kind) const

Description

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.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1483

Parameters

Attribute::AttrKind Kind

template <typename AttrKind>
bool hasFnAttrImpl(AttrKind Kind) const

Declared at: llvm/include/llvm/IR/InstrTypes.h:2315

Templates

AttrKind

Parameters

AttrKind Kind

bool hasFnAttrOnCalledFunction(
    Attribute::AttrKind Kind) const

Description

@ }

Declared at: llvm/include/llvm/IR/InstrTypes.h:2312

Parameters

Attribute::AttrKind Kind

bool hasFnAttrOnCalledFunction(
    llvm::StringRef Kind) const

Declared at: llvm/include/llvm/IR/InstrTypes.h:2313

Parameters

llvm::StringRef Kind

bool hasIdenticalOperandBundleSchema(
    const llvm::CallBase& Other) const

Description

Return true if \p Other has the same sequence of operand bundle tags with the same number of operands on each one of them as this OperandBundleUser.

Declared at: llvm/include/llvm/IR/InstrTypes.h:2104

Parameters

const llvm::CallBase& Other

bool hasImpliedFnAttr(
    Attribute::AttrKind Kind) const

Description

A specialized version of hasFnAttrImpl for when the caller wants to know if an attribute's semantics are implied, not whether the attribute is actually present. This distinction only exists when checking whether something is readonly or writeonly since readnone implies both. The case which motivates the specialized code is a callee with readnone, and an operand bundle on the call which disallows readnone but not either readonly or writeonly.

Declared at: llvm/include/llvm/IR/InstrTypes.h:2335

Parameters

Attribute::AttrKind Kind

bool hasInAllocaArgument() const

Description

Determine if there are is an inalloca argument. Only the last argument can have the inalloca attribute.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1708

bool hasOperandBundles() const

Description

Return true if this User has any operand bundles.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1945

bool hasOperandBundlesOtherThan(
    ArrayRef<uint32_t> IDs) const

Description

Return true if this operand bundle user contains operand bundles with tags other than those specified in \p IDs.

Declared at: llvm/include/llvm/IR/InstrTypes.h:2114

Parameters

ArrayRef<uint32_t> IDs

bool hasReadingOperandBundles() const

Description

Return true if this operand bundle user has operand bundles that may read from the heap.

Declared at: llvm/include/llvm/IR/InstrTypes.h:2074

bool hasRetAttr(llvm::StringRef Kind) const

Description

Determine whether the return value has the given attribute.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1599

Parameters

llvm::StringRef Kind

bool hasRetAttr(Attribute::AttrKind Kind) const

Description

Determine whether the return value has the given attribute.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1595

Parameters

Attribute::AttrKind Kind

template <typename AttrKind>
bool hasRetAttrImpl(AttrKind Kind) const

Description

Determine whether the return value has the given attribute. Supports Attribute::AttrKind and StringRef as \p AttrKind types.

Declared at: llvm/include/llvm/IR/InstrTypes.h:2350

Templates

AttrKind

Parameters

AttrKind Kind

bool hasStructRetAttr() const

Description

Determine if the call returns a structure through first pointer argument.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1917

bool isArgOperand(const llvm::Use* U) const

Declared at: llvm/include/llvm/IR/InstrTypes.h:1361

Parameters

const llvm::Use* U

bool isArgOperand(
    Value::const_user_iterator UI) const

Declared at: llvm/include/llvm/IR/InstrTypes.h:1366

Parameters

Value::const_user_iterator UI

bool isBundleOperand(unsigned int Idx) const

Description

Return true if the operand at index \p Idx is a bundle operand.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1960

Parameters

unsigned int Idx

bool isBundleOperand(const llvm::Use* U) const

Description

Returns true if the use is a bundle operand.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1973

Parameters

const llvm::Use* U

bool isBundleOperand(
    Value::const_user_iterator UI) const

Declared at: llvm/include/llvm/IR/InstrTypes.h:1978

Parameters

Value::const_user_iterator UI

bool isByValArgument(unsigned int ArgNo) const

Description

Determine whether this argument is passed by value.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1678

Parameters

unsigned int ArgNo

bool isCallee(Value::const_user_iterator UI) const

Description

Determine whether the passed iterator points to the callee operand's Use.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1407

Parameters

Value::const_user_iterator UI

bool isCallee(const llvm::Use* U) const

Description

Determine whether this Use is the callee operand's Use.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1412

Parameters

const llvm::Use* U

bool isConvergent() const

Description

Determine if the invoke is convergent

Declared at: llvm/include/llvm/IR/InstrTypes.h:1911

bool isDataOperand(const llvm::Use* U) const

Declared at: llvm/include/llvm/IR/InstrTypes.h:1293

Parameters

const llvm::Use* U

bool isDataOperand(
    Value::const_user_iterator UI) const

Declared at: llvm/include/llvm/IR/InstrTypes.h:1298

Parameters

Value::const_user_iterator UI

bool isFnAttrDisallowedByOpBundle(
    llvm::StringRef S) const

Description

Is the function attribute S disallowed by some operand bundle on this operand bundle user?

Declared at: llvm/include/llvm/IR/InstrTypes.h:2125

Parameters

llvm::StringRef S

bool isFnAttrDisallowedByOpBundle(
    Attribute::AttrKind A) const

Description

Is the function attribute A disallowed by some operand bundle on this operand bundle user?

Declared at: llvm/include/llvm/IR/InstrTypes.h:2133

Parameters

Attribute::AttrKind A

bool isInAllocaArgument(unsigned int ArgNo) const

Description

Determine whether this argument is passed in an alloca.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1683

Parameters

unsigned int ArgNo

bool isIndirectCall() const

Description

Return true if the callsite is an indirect call.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1404

bool isInlineAsm() const

Description

Check if this call is an inline asm statement.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1464

bool isMustTailCall() const

Description

Tests if this call site must be tail call optimized. Only a CallInst can be tail call optimized.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1422

bool isNoBuiltin() const

Description

Return true if the call should not be treated as a call to a builtin.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1839

bool isNoInline() const

Description

Return true if the call should not be inlined.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1848

bool isOperandBundleOfType(uint32_t ID,
                           unsigned int Idx) const

Description

Return true if the operand at index \p Idx is a bundle operand that has tag ID \p ID.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1967

Parameters

uint32_t ID
unsigned int Idx

bool isPassPointeeByValueArgument(
    unsigned int ArgNo) const

Description

Determine whether this argument is passed by value, in an alloca, or is preallocated.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1689

Parameters

unsigned int ArgNo

bool isPassingUndefUB(unsigned int ArgNo) const

Description

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.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1698

Parameters

unsigned int ArgNo

bool isReturnNonNull() const

Description

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).

Declared at: llvm/include/llvm/IR/InstrTypes.h:1820

bool isStrictFP() const

Description

Determine if the call requires strict floating point semantics.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1845

bool isTailCall() const

Description

Tests if this call site is marked as a tail call.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1425

void mutateFunctionType(llvm::FunctionType* FTy)

Declared at: llvm/include/llvm/IR/InstrTypes.h:1256

Parameters

llvm::FunctionType* FTy

bool onlyAccessesArgMemory() const

Description

Determine if the call can access memmory only using pointers based on its arguments.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1869

bool onlyAccessesInaccessibleMemOrArgMem() const

Description

Determine if the function may only access memory that is either inaccessible from the IR or pointed to by its arguments.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1885

bool onlyAccessesInaccessibleMemory() const

Description

Determine if the function may only access memory that is inaccessible from the IR.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1876

bool onlyReadsMemory() const

Description

Determine if the call does not access or only reads memory.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1855

bool onlyReadsMemory(unsigned int OpNo) const

Declared at: llvm/include/llvm/IR/InstrTypes.h:1720

Parameters

unsigned int OpNo

bool onlyWritesMemory(unsigned int OpNo) const

Declared at: llvm/include/llvm/IR/InstrTypes.h:1727

Parameters

unsigned int OpNo

bool onlyWritesMemory() const

Description

Determine if the call does not access or only writes memory.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1862

llvm::OperandBundleUse
operandBundleFromBundleOpInfo(
    const llvm::CallBase::BundleOpInfo& BOI) const

Description

Simple helper function to map a BundleOpInfo to an OperandBundleUse.

Declared at: llvm/include/llvm/IR/InstrTypes.h:2183

Parameters

const llvm::CallBase::BundleOpInfo& BOI

bool paramHasAttr(unsigned int ArgNo,
                  Attribute::AttrKind Kind) const

Description

Determine whether the argument or parameter has the given attribute.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1602

Parameters

unsigned int ArgNo
Attribute::AttrKind Kind

llvm::User::op_iterator
populateBundleOperandInfos(
    ArrayRef<llvm::OperandBundleDef> Bundles,
    const unsigned int BeginIndex)

Description

Populate the BundleOpInfo instances and the Use & vector from \p Bundles. Return the op_iterator pointing to the Use & one past the last last bundle operand use. Each \p OperandBundleDef instance is tracked by a OperandBundleInfo instance allocated in this User's descriptor.

Declared at: llvm/include/llvm/IR/InstrTypes.h:2286

Parameters

ArrayRef<llvm::OperandBundleDef> Bundles
const unsigned int BeginIndex

void removeAttributeAtIndex(
    unsigned int i,
    Attribute::AttrKind Kind)

Description

removes the attribute from the list of attributes.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1538

Parameters

unsigned int i
Attribute::AttrKind Kind

void removeAttributeAtIndex(unsigned int i,
                            llvm::StringRef Kind)

Description

removes the attribute from the list of attributes.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1543

Parameters

unsigned int i
llvm::StringRef Kind

void removeFnAttr(Attribute::AttrKind Kind)

Description

Removes the attribute from the function

Declared at: llvm/include/llvm/IR/InstrTypes.h:1553

Parameters

Attribute::AttrKind Kind

void removeFnAttrs(
    const llvm::AttributeMask& AttrsToRemove)

Description

Removes the attributes from the function

Declared at: llvm/include/llvm/IR/InstrTypes.h:1548

Parameters

const llvm::AttributeMask& AttrsToRemove

static llvm::CallBase* removeOperandBundle(
    llvm::CallBase* CB,
    uint32_t ID,
    llvm::Instruction* InsertPt = nullptr)

Description

Create a clone of \p CB with operand bundle \p ID removed.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1242

Parameters

llvm::CallBase* CB
uint32_t ID
llvm::Instruction* InsertPt = nullptr

void removeParamAttr(unsigned int ArgNo,
                     Attribute::AttrKind Kind)

Description

Removes the attribute from the given argument

Declared at: llvm/include/llvm/IR/InstrTypes.h:1568

Parameters

unsigned int ArgNo
Attribute::AttrKind Kind

void removeParamAttr(unsigned int ArgNo,
                     llvm::StringRef Kind)

Description

Removes the attribute from the given argument

Declared at: llvm/include/llvm/IR/InstrTypes.h:1574

Parameters

unsigned int ArgNo
llvm::StringRef Kind

void removeParamAttrs(
    unsigned int ArgNo,
    const llvm::AttributeMask& AttrsToRemove)

Description

Removes the attributes from the given argument

Declared at: llvm/include/llvm/IR/InstrTypes.h:1580

Parameters

unsigned int ArgNo
const llvm::AttributeMask& AttrsToRemove

void removeRetAttr(Attribute::AttrKind Kind)

Description

Removes the attribute from the return value

Declared at: llvm/include/llvm/IR/InstrTypes.h:1558

Parameters

Attribute::AttrKind Kind

void removeRetAttrs(
    const llvm::AttributeMask& AttrsToRemove)

Description

Removes the attributes from the return value

Declared at: llvm/include/llvm/IR/InstrTypes.h:1563

Parameters

const llvm::AttributeMask& AttrsToRemove

bool returnDoesNotAlias() const

Description

Determine if the return value is marked with NoAlias attribute.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1823

void setArgOperand(unsigned int i, llvm::Value* v)

Declared at: llvm/include/llvm/IR/InstrTypes.h:1346

Parameters

unsigned int i
llvm::Value* v

void setAttributes(llvm::AttributeList A)

Description

Set the parameter attributes for this call.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1478

Parameters

llvm::AttributeList A

void setCalledFunction(llvm::FunctionType* FTy,
                       llvm::Value* Fn)

Description

Sets the function called, including updating to the specified function type.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1446

Parameters

llvm::FunctionType* FTy
llvm::Value* Fn

void setCalledFunction(llvm::FunctionCallee Fn)

Description

Sets the function called, including updating the function type.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1440

Parameters

llvm::FunctionCallee Fn

void setCalledFunction(llvm::Function* Fn)

Description

Sets the function called, including updating the function type.

Declared at: llvm/include/llvm/IR/InstrTypes.h:1435

Parameters

llvm::Function* Fn

void setCalledOperand(llvm::Value* V)

Declared at: llvm/include/llvm/IR/InstrTypes.h:1432

Parameters

llvm::Value* V

void setCallingConv(CallingConv::ID CC)

Declared at: llvm/include/llvm/IR/InstrTypes.h:1459

Parameters

CallingConv::ID CC

void setCannotDuplicate()

Declared at: llvm/include/llvm/IR/InstrTypes.h:1904

void setCannotMerge()

Declared at: llvm/include/llvm/IR/InstrTypes.h:1908

void setConvergent()

Declared at: llvm/include/llvm/IR/InstrTypes.h:1912

void setDoesNotAccessMemory()

Declared at: llvm/include/llvm/IR/InstrTypes.h:1852

void setDoesNotReturn()

Declared at: llvm/include/llvm/IR/InstrTypes.h:1893

void setDoesNotThrow()

Declared at: llvm/include/llvm/IR/InstrTypes.h:1900

void setIsNoInline()

Declared at: llvm/include/llvm/IR/InstrTypes.h:1849

void setNotConvergent()

Declared at: llvm/include/llvm/IR/InstrTypes.h:1913

void setOnlyAccessesArgMemory()

Declared at: llvm/include/llvm/IR/InstrTypes.h:1872

void setOnlyAccessesInaccessibleMemOrArgMem()

Declared at: llvm/include/llvm/IR/InstrTypes.h:1888

void setOnlyAccessesInaccessibleMemory()

Declared at: llvm/include/llvm/IR/InstrTypes.h:1879

void setOnlyReadsMemory()

Declared at: llvm/include/llvm/IR/InstrTypes.h:1859

void setOnlyWritesMemory()

Declared at: llvm/include/llvm/IR/InstrTypes.h:1865