LLVM  8.0.1
Public Member Functions | Friends | List of all members
llvm::CallSite Class Reference

#include "llvm/IR/CallSite.h"

Inheritance diagram for llvm::CallSite:
Inheritance graph
[legend]
Collaboration diagram for llvm::CallSite:
Collaboration graph
[legend]

Public Member Functions

 CallSite ()=default
 
 CallSite (CallSiteBase B)
 
 CallSite (CallInst *CI)
 
 CallSite (InvokeInst *II)
 
 CallSite (Instruction *II)
 
 CallSite (Value *V)
 
bool operator== (const CallSite &CS) const
 
bool operator!= (const CallSite &CS) const
 
bool operator< (const CallSite &CS) const
 
- Public Member Functions inherited from llvm::CallSiteBase< Function, BasicBlock, Value, User, Use, Instruction, CallInst, InvokeInst, User::op_iterator >
bool isCall () const
 Return true if a CallInst is enclosed. More...
 
bool isInvoke () const
 Return true if a InvokeInst is enclosed. More...
 
InstructiongetInstruction () const
 
Instructionoperator-> () const
 
 operator bool () const
 
BasicBlockgetParent () const
 Get the basic block containing the call site. More...
 
ValuegetCalledValue () const
 Return the pointer to function that is being called. More...
 
FunctiongetCalledFunction () const
 Return the function being called if this is a direct call, otherwise return null (if it's an indirect call). More...
 
bool isIndirectCall () const
 Return true if the callsite is an indirect call. More...
 
void setCalledFunction (Value *V)
 Set the callee to the specified value. More...
 
Intrinsic::ID getIntrinsicID () const
 Return the intrinsic ID of the intrinsic called by this CallSite, or Intrinsic::not_intrinsic if the called function is not an intrinsic, or if this 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...
 
bool isArgOperand (Value::const_user_iterator UI) const
 Determine whether the passed iterator points to an argument operand. More...
 
bool isArgOperand (const Use *U) const
 Determine whether the passed use points to an argument operand. More...
 
bool isBundleOperand (Value::const_user_iterator UI) const
 Determine whether the passed iterator points to a bundle operand. More...
 
bool isBundleOperand (const Use *U) const
 Determine whether the passed use points to a bundle operand. More...
 
bool isBundleOperand (unsigned Idx) const
 
bool isDataOperand (Value::const_user_iterator UI) const
 Determine whether the passed iterator points to a data operand. More...
 
bool isDataOperand (const Use *U) const
 Determine whether the passed use points to a data operand. More...
 
ValuegetArgument (unsigned ArgNo) const
 
void setArgument (unsigned ArgNo, Value *newVal)
 
unsigned getArgumentNo (Value::const_user_iterator I) const
 Given a value use iterator, returns the argument that corresponds to it. More...
 
unsigned getArgumentNo (const Use *U) const
 Given a use for an argument, get the argument number that corresponds to it. More...
 
iterator_range< User::op_iteratorargs () const
 
bool arg_empty () const
 
unsigned arg_size () const
 
unsigned getDataOperandNo (Value::const_user_iterator UI) const
 Given a value use iterator, return the data operand corresponding to it. More...
 
unsigned getDataOperandNo (const Use *U) const
 Given a use for a data operand, get the data operand number that corresponds to it. More...
 
User::op_iterator data_operands_begin () const
 data_operands_begin/data_operands_end - Return iterators iterating over the call / invoke argument list and bundle operands. More...
 
User::op_iterator data_operands_end () const
 
iterator_range< User::op_iteratordata_ops () const
 
bool data_operands_empty () const
 
unsigned data_operands_size () const
 
TypegetType () const
 Return the type of the instruction that generated this call site. More...
 
FunctiongetCaller () const
 Return the caller function for this call site. More...
 
bool isMustTailCall () const
 Tests if this call site must be tail call optimized. More...
 
bool isTailCall () const
 Tests if this call site is marked as a tail call. More...
 
unsigned getNumArgOperands () const
 
ValuegetArgOperand (unsigned i) const
 
ValuegetReturnedArgOperand () const
 
bool isInlineAsm () const
 
CallingConv::ID getCallingConv () const
 Get the calling convention of the call. More...
 
void setCallingConv (CallingConv::ID CC)
 Set the calling convention of the call. More...
 
FunctionTypegetFunctionType () const
 
void mutateFunctionType (FunctionType *Ty) const
 
AttributeList getAttributes () const
 Get the parameter attributes of the call. More...
 
void setAttributes (AttributeList PAL)
 Set the parameter attributes of the call. More...
 
void addAttribute (unsigned i, Attribute::AttrKind Kind)
 
void addAttribute (unsigned i, Attribute Attr)
 
void addParamAttr (unsigned ArgNo, Attribute::AttrKind Kind)
 
void removeAttribute (unsigned i, Attribute::AttrKind Kind)
 
void removeAttribute (unsigned i, StringRef Kind)
 
void removeParamAttr (unsigned ArgNo, Attribute::AttrKind Kind)
 
bool hasFnAttr (Attribute::AttrKind Kind) const
 Return true if this function has the given attribute. More...
 
bool hasFnAttr (StringRef Kind) const
 Return true if this function has the given attribute. More...
 
bool hasRetAttr (Attribute::AttrKind Kind) const
 Return true if this return value has the given attribute. More...
 
bool paramHasAttr (unsigned ArgNo, Attribute::AttrKind Kind) const
 Return true if the call or the callee has the given attribute. More...
 
Attribute getAttribute (unsigned i, Attribute::AttrKind Kind) const
 
Attribute getAttribute (unsigned i, StringRef Kind) const
 
bool dataOperandHasImpliedAttr (unsigned i, Attribute::AttrKind Kind) const
 Return true if the data operand at index i directly or indirectly has the attribute A. More...
 
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 returnDoesNotAlias () const
 Determine if the return value is marked with NoAlias attribute. More...
 
bool isNoBuiltin () const
 Return true if the call should not be treated as a call to a builtin. More...
 
bool isStrictFP () const
 Return true 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 Value=true)
 
bool doesNotAccessMemory () const
 Determine if the call does not access memory. More...
 
bool doesNotAccessMemory (unsigned OpNo) const
 
void setDoesNotAccessMemory ()
 
bool onlyReadsMemory () const
 Determine if the call does not access or only reads memory. More...
 
bool onlyReadsMemory (unsigned OpNo) const
 
void setOnlyReadsMemory ()
 
bool doesNotReadMemory () const
 Determine if the call does not access or only writes memory. More...
 
bool doesNotReadMemory (unsigned OpNo) const
 
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 doesNotThrow () const
 Determine if the call cannot unwind. More...
 
void setDoesNotThrow ()
 
bool cannotDuplicate () const
 Determine if the call can be duplicated. More...
 
void setCannotDuplicate ()
 
bool isConvergent () const
 Determine if the call is convergent. More...
 
void setConvergent ()
 
void setNotConvergent ()
 
unsigned getNumOperandBundles () const
 
bool hasOperandBundles () const
 
unsigned getBundleOperandsStartIndex () const
 
unsigned getBundleOperandsEndIndex () const
 
unsigned getNumTotalBundleOperands () const
 
OperandBundleUse getOperandBundleAt (unsigned Index) const
 
Optional< OperandBundleUsegetOperandBundle (StringRef Name) const
 
Optional< OperandBundleUsegetOperandBundle (uint32_t ID) const
 
unsigned countOperandBundlesOfType (uint32_t ID) const
 
User::op_iterator arg_begin () const
 
User::op_iterator arg_end () const
 
void getOperandBundlesAsDefs (SmallVectorImpl< OperandBundleDef > &Defs) const
 
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 isReturnNonNull () const
 Return true if the return value is known to be not null. More...
 
bool hasArgument (const Value *Arg) const
 Returns true if this CallSite passes the given Value* as an argument to the called function. More...
 

Friends

struct DenseMapInfo< CallSite >
 

Additional Inherited Members

- Public Types inherited from llvm::CallSiteBase< Function, BasicBlock, Value, User, Use, Instruction, CallInst, InvokeInst, User::op_iterator >
using arg_iterator = User::op_iterator
 The type of iterator to use when looping over actual arguments at this call site. More...
 
using data_operand_iterator = User::op_iterator
 Type of iterator to use when looping over data operands at this call site (see below). More...
 
- Protected Member Functions inherited from llvm::CallSiteBase< Function, BasicBlock, Value, User, Use, Instruction, CallInst, InvokeInst, User::op_iterator >
 CallSiteBase ()=default
 
 CallSiteBase (CallInst *CI)
 
 CallSiteBase (InvokeInst *II)
 
 CallSiteBase (Value *II)
 
- Protected Attributes inherited from llvm::CallSiteBase< Function, BasicBlock, Value, User, Use, Instruction, CallInst, InvokeInst, User::op_iterator >
PointerIntPair< Instruction *, 1, boolI
 

Detailed Description

Definition at line 663 of file CallSite.h.

Constructor & Destructor Documentation

◆ CallSite() [1/6]

llvm::CallSite::CallSite ( )
default

◆ CallSite() [2/6]

llvm::CallSite::CallSite ( CallSiteBase  B)
inline

Definition at line 668 of file CallSite.h.

◆ CallSite() [3/6]

llvm::CallSite::CallSite ( CallInst CI)
inline

Definition at line 669 of file CallSite.h.

◆ CallSite() [4/6]

llvm::CallSite::CallSite ( InvokeInst II)
inline

Definition at line 670 of file CallSite.h.

◆ CallSite() [5/6]

llvm::CallSite::CallSite ( Instruction II)
inlineexplicit

Definition at line 671 of file CallSite.h.

◆ CallSite() [6/6]

llvm::CallSite::CallSite ( Value V)
inlineexplicit

Definition at line 672 of file CallSite.h.

Member Function Documentation

◆ operator!=()

bool llvm::CallSite::operator!= ( const CallSite CS) const
inline

◆ operator<()

bool llvm::CallSite::operator< ( const CallSite CS) const
inline

◆ operator==()

bool llvm::CallSite::operator== ( const CallSite CS) const
inline

Friends And Related Function Documentation

◆ DenseMapInfo< CallSite >

friend struct DenseMapInfo< CallSite >
friend

Definition at line 681 of file CallSite.h.


The documentation for this class was generated from the following files: