class CallInst

Declaration

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

Description

This class represents a function call, abstracting a target machine's calling convention. This class uses low bit of the SubClassData field to indicate whether or not this is a tail call. The rest of the bits hold the calling convention of the call.

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

Inherits from: CallBase

Member Variables

Inherited from CallBase:

protected Attrs
protected FTy
protected static CalledOperandOpEndIdx = -1

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

  • private inline CallInst(llvm::FunctionType * Ty, llvm::Value * Func, ArrayRef<llvm::Value *> Args, ArrayRef<llvm::OperandBundleDef> Bundles, const llvm::Twine & NameStr, llvm::Instruction * InsertBefore)
  • private inline CallInst(llvm::FunctionType * Ty, llvm::Value * Func, ArrayRef<llvm::Value *> Args, const llvm::Twine & NameStr, llvm::Instruction * InsertBefore)
  • private inline CallInst(llvm::FunctionType * Ty, llvm::Value * Func, ArrayRef<llvm::Value *> Args, ArrayRef<llvm::OperandBundleDef> Bundles, const llvm::Twine & NameStr, llvm::BasicBlock * InsertAtEnd)
  • private CallInst(llvm::FunctionType * Ty, llvm::Value * F, const llvm::Twine & NameStr, llvm::Instruction * InsertBefore)
  • private CallInst(llvm::FunctionType * ty, llvm::Value * F, const llvm::Twine & NameStr, llvm::BasicBlock * InsertAtEnd)
  • private CallInst(const llvm::CallInst & CI)
  • private static int ComputeNumOperands(int NumArgs, int NumBundleInputs = 0)
  • public static llvm::CallInst * Create(llvm::FunctionCallee Func, ArrayRef<llvm::Value *> Args, ArrayRef<llvm::OperandBundleDef> Bundles, const llvm::Twine & NameStr, llvm::BasicBlock * InsertAtEnd)
  • public static llvm::CallInst * Create(llvm::CallInst * CI, ArrayRef<llvm::OperandBundleDef> Bundles, llvm::Instruction * InsertPt = nullptr)
  • public static llvm::CallInst * Create(llvm::FunctionCallee Func, ArrayRef<llvm::Value *> Args, const llvm::Twine & NameStr, llvm::BasicBlock * InsertAtEnd)
  • public static llvm::CallInst * Create(llvm::FunctionCallee Func, const llvm::Twine & NameStr, llvm::BasicBlock * InsertAtEnd)
  • public static llvm::CallInst * Create(llvm::FunctionCallee Func, ArrayRef<llvm::Value *> Args, const llvm::Twine & NameStr, llvm::Instruction * InsertBefore = nullptr)
  • public static llvm::CallInst * Create(llvm::FunctionCallee Func, ArrayRef<llvm::Value *> Args, ArrayRef<llvm::OperandBundleDef> Bundles = None, const llvm::Twine & NameStr = "", llvm::Instruction * InsertBefore = nullptr)
  • public static llvm::CallInst * Create(llvm::FunctionCallee Func, const llvm::Twine & NameStr = "", llvm::Instruction * InsertBefore = nullptr)
  • public static llvm::CallInst * Create(llvm::FunctionType * Ty, llvm::Value * Func, ArrayRef<llvm::Value *> Args, ArrayRef<llvm::OperandBundleDef> Bundles, const llvm::Twine & NameStr, llvm::BasicBlock * InsertAtEnd)
  • public static llvm::CallInst * Create(llvm::FunctionType * Ty, llvm::Value * F, const llvm::Twine & NameStr, llvm::BasicBlock * InsertAtEnd)
  • public static llvm::CallInst * Create(llvm::FunctionType * Ty, llvm::Value * Func, ArrayRef<llvm::Value *> Args, ArrayRef<llvm::OperandBundleDef> Bundles = None, const llvm::Twine & NameStr = "", llvm::Instruction * InsertBefore = nullptr)
  • public static llvm::CallInst * Create(llvm::FunctionType * Ty, llvm::Value * Func, ArrayRef<llvm::Value *> Args, const llvm::Twine & NameStr, llvm::Instruction * InsertBefore = nullptr)
  • public static llvm::CallInst * Create(llvm::FunctionType * Ty, llvm::Value * F, const llvm::Twine & NameStr = "", llvm::Instruction * InsertBefore = nullptr)
  • public static llvm::CallInst * Create(llvm::FunctionType * Ty, llvm::Value * Func, ArrayRef<llvm::Value *> Args, const llvm::Twine & NameStr, llvm::BasicBlock * InsertAtEnd)
  • public static llvm::Instruction * CreateFree(llvm::Value * Source, ArrayRef<llvm::OperandBundleDef> Bundles, llvm::Instruction * InsertBefore)
  • public static llvm::Instruction * CreateFree(llvm::Value * Source, ArrayRef<llvm::OperandBundleDef> Bundles, llvm::BasicBlock * InsertAtEnd)
  • public static llvm::Instruction * CreateFree(llvm::Value * Source, llvm::BasicBlock * InsertAtEnd)
  • public static llvm::Instruction * CreateFree(llvm::Value * Source, llvm::Instruction * InsertBefore)
  • public static llvm::Instruction * CreateMalloc(llvm::Instruction * InsertBefore, llvm::Type * IntPtrTy, llvm::Type * AllocTy, llvm::Value * AllocSize, llvm::Value * ArraySize = nullptr, ArrayRef<llvm::OperandBundleDef> Bundles = None, llvm::Function * MallocF = nullptr, const llvm::Twine & Name = "")
  • public static llvm::Instruction * CreateMalloc(llvm::BasicBlock * InsertAtEnd, llvm::Type * IntPtrTy, llvm::Type * AllocTy, llvm::Value * AllocSize, llvm::Value * ArraySize = nullptr, ArrayRef<llvm::OperandBundleDef> Bundles = None, llvm::Function * MallocF = nullptr, const llvm::Twine & Name = "")
  • public static llvm::Instruction * CreateMalloc(llvm::Instruction * InsertBefore, llvm::Type * IntPtrTy, llvm::Type * AllocTy, llvm::Value * AllocSize, llvm::Value * ArraySize = nullptr, llvm::Function * MallocF = nullptr, const llvm::Twine & Name = "")
  • public static llvm::Instruction * CreateMalloc(llvm::BasicBlock * InsertAtEnd, llvm::Type * IntPtrTy, llvm::Type * AllocTy, llvm::Value * AllocSize, llvm::Value * ArraySize = nullptr, llvm::Function * MallocF = nullptr, const llvm::Twine & Name = "")
  • public bool canReturnTwice() const
  • public static bool classof(const llvm::Value * V)
  • public static bool classof(const llvm::Instruction * I)
  • protected llvm::CallInst * cloneImpl() const
  • public llvm::CallInst::TailCallKind getTailCallKind() const
  • private void init(llvm::FunctionType * FTy, llvm::Value * Func, ArrayRef<llvm::Value *> Args, ArrayRef<llvm::OperandBundleDef> Bundles, const llvm::Twine & NameStr)
  • private void init(llvm::FunctionType * FTy, llvm::Value * Func, const llvm::Twine & NameStr)
  • public bool isMustTailCall() const
  • public bool isNoTailCall() const
  • public bool isTailCall() const
  • public void setCanReturnTwice()
  • private template <typename Bitfield>void setSubclassData(typename Bitfield::Type Value)
  • public void setTailCall(bool IsTc = true)
  • public void setTailCallKind(llvm::CallInst::TailCallKind TCK)
  • public void updateProfWeight(uint64_t S, uint64_t T)

Inherited from CallBase:

Inherited from Instruction:

Inherited from User:

Inherited from Value:

Methods

inline CallInst(
    llvm::FunctionType* Ty,
    llvm::Value* Func,
    ArrayRef<llvm::Value*> Args,
    ArrayRef<llvm::OperandBundleDef> Bundles,
    const llvm::Twine& NameStr,
    llvm::Instruction* InsertBefore)

Description

Construct a CallInst given a range of arguments. Construct a CallInst from a range of arguments

Declared at: llvm/include/llvm/IR/Instructions.h:1479

Parameters

llvm::FunctionType* Ty
llvm::Value* Func
ArrayRef<llvm::Value*> Args
ArrayRef<llvm::OperandBundleDef> Bundles
const llvm::Twine& NameStr
llvm::Instruction* InsertBefore

inline CallInst(llvm::FunctionType* Ty,
                llvm::Value* Func,
                ArrayRef<llvm::Value*> Args,
                const llvm::Twine& NameStr,
                llvm::Instruction* InsertBefore)

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

Parameters

llvm::FunctionType* Ty
llvm::Value* Func
ArrayRef<llvm::Value*> Args
const llvm::Twine& NameStr
llvm::Instruction* InsertBefore

inline CallInst(
    llvm::FunctionType* Ty,
    llvm::Value* Func,
    ArrayRef<llvm::Value*> Args,
    ArrayRef<llvm::OperandBundleDef> Bundles,
    const llvm::Twine& NameStr,
    llvm::BasicBlock* InsertAtEnd)

Description

Construct a CallInst given a range of arguments. Construct a CallInst from a range of arguments

Declared at: llvm/include/llvm/IR/Instructions.h:1489

Parameters

llvm::FunctionType* Ty
llvm::Value* Func
ArrayRef<llvm::Value*> Args
ArrayRef<llvm::OperandBundleDef> Bundles
const llvm::Twine& NameStr
llvm::BasicBlock* InsertAtEnd

CallInst(llvm::FunctionType* Ty,
         llvm::Value* F,
         const llvm::Twine& NameStr,
         llvm::Instruction* InsertBefore)

Declared at: llvm/include/llvm/IR/Instructions.h:1493

Parameters

llvm::FunctionType* Ty
llvm::Value* F
const llvm::Twine& NameStr
llvm::Instruction* InsertBefore

CallInst(llvm::FunctionType* ty,
         llvm::Value* F,
         const llvm::Twine& NameStr,
         llvm::BasicBlock* InsertAtEnd)

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

Parameters

llvm::FunctionType* ty
llvm::Value* F
const llvm::Twine& NameStr
llvm::BasicBlock* InsertAtEnd

CallInst(const llvm::CallInst& CI)

Declared at: llvm/include/llvm/IR/Instructions.h:1475

Parameters

const llvm::CallInst& CI

static int ComputeNumOperands(
    int NumArgs,
    int NumBundleInputs = 0)

Description

Compute the number of operands to allocate.

Declared at: llvm/include/llvm/IR/Instructions.h:1504

Parameters

int NumArgs
int NumBundleInputs = 0

static llvm::CallInst* Create(
    llvm::FunctionCallee Func,
    ArrayRef<llvm::Value*> Args,
    ArrayRef<llvm::OperandBundleDef> Bundles,
    const llvm::Twine& NameStr,
    llvm::BasicBlock* InsertAtEnd)

Declared at: llvm/include/llvm/IR/Instructions.h:1596

Parameters

llvm::FunctionCallee Func
ArrayRef<llvm::Value*> Args
ArrayRef<llvm::OperandBundleDef> Bundles
const llvm::Twine& NameStr
llvm::BasicBlock* InsertAtEnd

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

Description

Create a clone of \p CI with a different set of operand bundles and insert it before \p InsertPt. The returned call instruction is identical \p CI 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/Instructions.h:1609

Parameters

llvm::CallInst* CI
ArrayRef<llvm::OperandBundleDef> Bundles
llvm::Instruction* InsertPt = nullptr

static llvm::CallInst* Create(
    llvm::FunctionCallee Func,
    ArrayRef<llvm::Value*> Args,
    const llvm::Twine& NameStr,
    llvm::BasicBlock* InsertAtEnd)

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

Parameters

llvm::FunctionCallee Func
ArrayRef<llvm::Value*> Args
const llvm::Twine& NameStr
llvm::BasicBlock* InsertAtEnd

static llvm::CallInst* Create(
    llvm::FunctionCallee Func,
    const llvm::Twine& NameStr,
    llvm::BasicBlock* InsertAtEnd)

Declared at: llvm/include/llvm/IR/Instructions.h:1584

Parameters

llvm::FunctionCallee Func
const llvm::Twine& NameStr
llvm::BasicBlock* InsertAtEnd

static llvm::CallInst* Create(
    llvm::FunctionCallee Func,
    ArrayRef<llvm::Value*> Args,
    const llvm::Twine& NameStr,
    llvm::Instruction* InsertBefore = nullptr)

Declared at: llvm/include/llvm/IR/Instructions.h:1577

Parameters

llvm::FunctionCallee Func
ArrayRef<llvm::Value*> Args
const llvm::Twine& NameStr
llvm::Instruction* InsertBefore = nullptr

static llvm::CallInst* Create(
    llvm::FunctionCallee Func,
    ArrayRef<llvm::Value*> Args,
    ArrayRef<llvm::OperandBundleDef> Bundles =
        None,
    const llvm::Twine& NameStr = "",
    llvm::Instruction* InsertBefore = nullptr)

Declared at: llvm/include/llvm/IR/Instructions.h:1569

Parameters

llvm::FunctionCallee Func
ArrayRef<llvm::Value*> Args
ArrayRef<llvm::OperandBundleDef> Bundles = None
const llvm::Twine& NameStr = ""
llvm::Instruction* InsertBefore = nullptr

static llvm::CallInst* Create(
    llvm::FunctionCallee Func,
    const llvm::Twine& NameStr = "",
    llvm::Instruction* InsertBefore = nullptr)

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

Parameters

llvm::FunctionCallee Func
const llvm::Twine& NameStr = ""
llvm::Instruction* InsertBefore = nullptr

static llvm::CallInst* Create(
    llvm::FunctionType* Ty,
    llvm::Value* Func,
    ArrayRef<llvm::Value*> Args,
    ArrayRef<llvm::OperandBundleDef> Bundles,
    const llvm::Twine& NameStr,
    llvm::BasicBlock* InsertAtEnd)

Declared at: llvm/include/llvm/IR/Instructions.h:1552

Parameters

llvm::FunctionType* Ty
llvm::Value* Func
ArrayRef<llvm::Value*> Args
ArrayRef<llvm::OperandBundleDef> Bundles
const llvm::Twine& NameStr
llvm::BasicBlock* InsertAtEnd

static llvm::CallInst* Create(
    llvm::FunctionType* Ty,
    llvm::Value* F,
    const llvm::Twine& NameStr,
    llvm::BasicBlock* InsertAtEnd)

Declared at: llvm/include/llvm/IR/Instructions.h:1541

Parameters

llvm::FunctionType* Ty
llvm::Value* F
const llvm::Twine& NameStr
llvm::BasicBlock* InsertAtEnd

static llvm::CallInst* Create(
    llvm::FunctionType* Ty,
    llvm::Value* Func,
    ArrayRef<llvm::Value*> Args,
    ArrayRef<llvm::OperandBundleDef> Bundles =
        None,
    const llvm::Twine& NameStr = "",
    llvm::Instruction* InsertBefore = nullptr)

Declared at: llvm/include/llvm/IR/Instructions.h:1529

Parameters

llvm::FunctionType* Ty
llvm::Value* Func
ArrayRef<llvm::Value*> Args
ArrayRef<llvm::OperandBundleDef> Bundles = None
const llvm::Twine& NameStr = ""
llvm::Instruction* InsertBefore = nullptr

static llvm::CallInst* Create(
    llvm::FunctionType* Ty,
    llvm::Value* Func,
    ArrayRef<llvm::Value*> Args,
    const llvm::Twine& NameStr,
    llvm::Instruction* InsertBefore = nullptr)

Declared at: llvm/include/llvm/IR/Instructions.h:1522

Parameters

llvm::FunctionType* Ty
llvm::Value* Func
ArrayRef<llvm::Value*> Args
const llvm::Twine& NameStr
llvm::Instruction* InsertBefore = nullptr

static llvm::CallInst* Create(
    llvm::FunctionType* Ty,
    llvm::Value* F,
    const llvm::Twine& NameStr = "",
    llvm::Instruction* InsertBefore = nullptr)

Declared at: llvm/include/llvm/IR/Instructions.h:1517

Parameters

llvm::FunctionType* Ty
llvm::Value* F
const llvm::Twine& NameStr = ""
llvm::Instruction* InsertBefore = nullptr

static llvm::CallInst* Create(
    llvm::FunctionType* Ty,
    llvm::Value* Func,
    ArrayRef<llvm::Value*> Args,
    const llvm::Twine& NameStr,
    llvm::BasicBlock* InsertAtEnd)

Declared at: llvm/include/llvm/IR/Instructions.h:1546

Parameters

llvm::FunctionType* Ty
llvm::Value* Func
ArrayRef<llvm::Value*> Args
const llvm::Twine& NameStr
llvm::BasicBlock* InsertAtEnd

static llvm::Instruction* CreateFree(
    llvm::Value* Source,
    ArrayRef<llvm::OperandBundleDef> Bundles,
    llvm::Instruction* InsertBefore)

Declared at: llvm/include/llvm/IR/Instructions.h:1643

Parameters

llvm::Value* Source
ArrayRef<llvm::OperandBundleDef> Bundles
llvm::Instruction* InsertBefore

static llvm::Instruction* CreateFree(
    llvm::Value* Source,
    ArrayRef<llvm::OperandBundleDef> Bundles,
    llvm::BasicBlock* InsertAtEnd)

Declared at: llvm/include/llvm/IR/Instructions.h:1646

Parameters

llvm::Value* Source
ArrayRef<llvm::OperandBundleDef> Bundles
llvm::BasicBlock* InsertAtEnd

static llvm::Instruction* CreateFree(
    llvm::Value* Source,
    llvm::BasicBlock* InsertAtEnd)

Declared at: llvm/include/llvm/IR/Instructions.h:1642

Parameters

llvm::Value* Source
llvm::BasicBlock* InsertAtEnd

static llvm::Instruction* CreateFree(
    llvm::Value* Source,
    llvm::Instruction* InsertBefore)

Description

Generate the IR for a call to the builtin free function.

Declared at: llvm/include/llvm/IR/Instructions.h:1641

Parameters

llvm::Value* Source
llvm::Instruction* InsertBefore

static llvm::Instruction* CreateMalloc(
    llvm::Instruction* InsertBefore,
    llvm::Type* IntPtrTy,
    llvm::Type* AllocTy,
    llvm::Value* AllocSize,
    llvm::Value* ArraySize = nullptr,
    ArrayRef<llvm::OperandBundleDef> Bundles =
        None,
    llvm::Function* MallocF = nullptr,
    const llvm::Twine& Name = "")

Declared at: llvm/include/llvm/IR/Instructions.h:1628

Parameters

llvm::Instruction* InsertBefore
llvm::Type* IntPtrTy
llvm::Type* AllocTy
llvm::Value* AllocSize
llvm::Value* ArraySize = nullptr
ArrayRef<llvm::OperandBundleDef> Bundles = None
llvm::Function* MallocF = nullptr
const llvm::Twine& Name = ""

static llvm::Instruction* CreateMalloc(
    llvm::BasicBlock* InsertAtEnd,
    llvm::Type* IntPtrTy,
    llvm::Type* AllocTy,
    llvm::Value* AllocSize,
    llvm::Value* ArraySize = nullptr,
    ArrayRef<llvm::OperandBundleDef> Bundles =
        None,
    llvm::Function* MallocF = nullptr,
    const llvm::Twine& Name = "")

Declared at: llvm/include/llvm/IR/Instructions.h:1634

Parameters

llvm::BasicBlock* InsertAtEnd
llvm::Type* IntPtrTy
llvm::Type* AllocTy
llvm::Value* AllocSize
llvm::Value* ArraySize = nullptr
ArrayRef<llvm::OperandBundleDef> Bundles = None
llvm::Function* MallocF = nullptr
const llvm::Twine& Name = ""

static llvm::Instruction* CreateMalloc(
    llvm::Instruction* InsertBefore,
    llvm::Type* IntPtrTy,
    llvm::Type* AllocTy,
    llvm::Value* AllocSize,
    llvm::Value* ArraySize = nullptr,
    llvm::Function* MallocF = nullptr,
    const llvm::Twine& Name = "")

Description

Generate the IR for a call to malloc: 1. Compute the malloc call's argument as the specified type's size, possibly multiplied by the array size if the array size is not constant 1. 2. Call malloc with that argument. 3. Bitcast the result of the malloc call to the specified type.

Declared at: llvm/include/llvm/IR/Instructions.h:1618

Parameters

llvm::Instruction* InsertBefore
llvm::Type* IntPtrTy
llvm::Type* AllocTy
llvm::Value* AllocSize
llvm::Value* ArraySize = nullptr
llvm::Function* MallocF = nullptr
const llvm::Twine& Name = ""

static llvm::Instruction* CreateMalloc(
    llvm::BasicBlock* InsertAtEnd,
    llvm::Type* IntPtrTy,
    llvm::Type* AllocTy,
    llvm::Value* AllocSize,
    llvm::Value* ArraySize = nullptr,
    llvm::Function* MallocF = nullptr,
    const llvm::Twine& Name = "")

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

Parameters

llvm::BasicBlock* InsertAtEnd
llvm::Type* IntPtrTy
llvm::Type* AllocTy
llvm::Value* AllocSize
llvm::Value* ArraySize = nullptr
llvm::Function* MallocF = nullptr
const llvm::Twine& Name = ""

bool canReturnTwice() const

Description

Return true if the call can return twice

Declared at: llvm/include/llvm/IR/Instructions.h:1686

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

Declared at: llvm/include/llvm/IR/Instructions.h:1693

Parameters

const llvm::Value* V

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

Declared at: llvm/include/llvm/IR/Instructions.h:1690

Parameters

const llvm::Instruction* I

llvm::CallInst* cloneImpl() const

Declared at: llvm/include/llvm/IR/Instructions.h:1514

llvm::CallInst::TailCallKind getTailCallKind()
    const

Declared at: llvm/include/llvm/IR/Instructions.h:1664

void init(
    llvm::FunctionType* FTy,
    llvm::Value* Func,
    ArrayRef<llvm::Value*> Args,
    ArrayRef<llvm::OperandBundleDef> Bundles,
    const llvm::Twine& NameStr)

Declared at: llvm/include/llvm/IR/Instructions.h:1499

Parameters

llvm::FunctionType* FTy
llvm::Value* Func
ArrayRef<llvm::Value*> Args
ArrayRef<llvm::OperandBundleDef> Bundles
const llvm::Twine& NameStr

void init(llvm::FunctionType* FTy,
          llvm::Value* Func,
          const llvm::Twine& NameStr)

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

Parameters

llvm::FunctionType* FTy
llvm::Value* Func
const llvm::Twine& NameStr

bool isMustTailCall() const

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

bool isNoTailCall() const

Declared at: llvm/include/llvm/IR/Instructions.h:1675

bool isTailCall() const

Declared at: llvm/include/llvm/IR/Instructions.h:1668

void setCanReturnTwice()

Declared at: llvm/include/llvm/IR/Instructions.h:1687

template <typename Bitfield>
void setSubclassData(
    typename Bitfield::Type Value)

Declared at: llvm/include/llvm/IR/Instructions.h:1704

Templates

Bitfield

Parameters

typename Bitfield::Type Value

void setTailCall(bool IsTc = true)

Declared at: llvm/include/llvm/IR/Instructions.h:1681

Parameters

bool IsTc = true

void setTailCallKind(
    llvm::CallInst::TailCallKind TCK)

Declared at: llvm/include/llvm/IR/Instructions.h:1677

Parameters

llvm::CallInst::TailCallKind TCK

void updateProfWeight(uint64_t S, uint64_t T)

Description

Updates profile metadata by scaling it by \p S / \p T.

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

Parameters

uint64_t S
uint64_t T