LLVM API Documentation

llvm::CallInst Class Reference

#include <Instructions.h>

Inheritance diagram for llvm::CallInst:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 CallInst (Value *F, const std::vector< Value * > &Par, const std::string &Name="", Instruction *InsertBefore=0)
 CallInst (Value *F, const std::vector< Value * > &Par, const std::string &Name, BasicBlock *InsertAtEnd)
 CallInst (Value *F, Value *Actual1, Value *Actual2, const std::string &Name="", Instruction *InsertBefore=0)
 CallInst (Value *F, Value *Actual1, Value *Actual2, const std::string &Name, BasicBlock *InsertAtEnd)
 CallInst (Value *F, Value *Actual, const std::string &Name="", Instruction *InsertBefore=0)
 CallInst (Value *F, Value *Actual, const std::string &Name, BasicBlock *InsertAtEnd)
 CallInst (Value *F, const std::string &Name="", Instruction *InsertBefore=0)
 CallInst (Value *F, const std::string &Name, BasicBlock *InsertAtEnd)
 ~CallInst ()
virtual CallInstclone () const
bool mayWriteToMemory () const
bool isTailCall () const
void setTailCall (bool isTailCall=true)
unsigned getCallingConv () const
void setCallingConv (unsigned CC)
FunctiongetCalledFunction () const
const ValuegetCalledValue () const
ValuegetCalledValue ()

Static Public Member Functions

static bool classof (const CallInst *)
static bool classof (const Instruction *I)
 Methods for support type inquiry through isa, cast, and dyn_cast:.
static bool classof (const Value *V)

Detailed Description

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

Definition at line 498 of file Instructions.h.


Constructor & Destructor Documentation

CallInst::CallInst ( Value F,
const std::vector< Value * > &  Par,
const std::string &  Name = "",
Instruction InsertBefore = 0 
)

Definition at line 245 of file Instructions.cpp.

References Func.

CallInst::CallInst ( Value F,
const std::vector< Value * > &  Par,
const std::string &  Name,
BasicBlock InsertAtEnd 
)

Definition at line 253 of file Instructions.cpp.

References Func.

CallInst::CallInst ( Value F,
Value Actual1,
Value Actual2,
const std::string &  Name = "",
Instruction InsertBefore = 0 
)

Definition at line 261 of file Instructions.cpp.

References Func.

CallInst::CallInst ( Value F,
Value Actual1,
Value Actual2,
const std::string &  Name,
BasicBlock InsertAtEnd 
)

Definition at line 269 of file Instructions.cpp.

References Func.

CallInst::CallInst ( Value F,
Value Actual,
const std::string &  Name = "",
Instruction InsertBefore = 0 
)

Definition at line 277 of file Instructions.cpp.

References Func.

CallInst::CallInst ( Value F,
Value Actual,
const std::string &  Name,
BasicBlock InsertAtEnd 
)

Definition at line 285 of file Instructions.cpp.

References Func.

CallInst::CallInst ( Value F,
const std::string &  Name = "",
Instruction InsertBefore = 0 
) [explicit]

Definition at line 293 of file Instructions.cpp.

References Func.

CallInst::CallInst ( Value F,
const std::string &  Name,
BasicBlock InsertAtEnd 
) [explicit]

Definition at line 301 of file Instructions.cpp.

References Func.

CallInst::~CallInst (  ) 

Definition at line 186 of file Instructions.cpp.

References llvm::User::OperandList.


Member Function Documentation

static bool llvm::CallInst::classof ( const Value V  )  [inline, static]

Reimplemented from llvm::Instruction.

Reimplemented in llvm::IntrinsicInst, llvm::DbgInfoIntrinsic, llvm::DbgStopPointInst, llvm::DbgFuncStartInst, llvm::DbgRegionStartInst, llvm::DbgRegionEndInst, llvm::DbgDeclareInst, llvm::MemIntrinsic, llvm::MemCpyInst, llvm::MemMoveInst, and llvm::MemSetInst.

Definition at line 558 of file Instructions.h.

References llvm::CastInst::classof(), and V.

static bool llvm::CallInst::classof ( const Instruction I  )  [inline, static]

Methods for support type inquiry through isa, cast, and dyn_cast:.

Reimplemented from llvm::Instruction.

Definition at line 555 of file Instructions.h.

References llvm::Instruction::Call, and llvm::Instruction::getOpcode().

static bool llvm::CallInst::classof ( const CallInst  )  [inline, static]

Reimplemented in llvm::IntrinsicInst.

Definition at line 554 of file Instructions.h.

CallInst * CallInst::clone (  )  const [virtual]

clone() - Create a copy of 'this' instruction that is identical in all ways except the following: The instruction has no parent The instruction has no name

Implements llvm::Instruction.

Definition at line 1276 of file Instructions.cpp.

Function* llvm::CallInst::getCalledFunction (  )  const [inline]

getCalledFunction - Return the function being called by this instruction if it is a direct call. If it is a call through a function pointer, return null.

Definition at line 545 of file Instructions.h.

References llvm::UnaryInstruction::getOperand().

Referenced by llvm::IntrinsicInst::classof(), llvm::IntrinsicInst::getIntrinsicID(), HandleInlinedInvoke(), llvm::DefaultIntrinsicLowering::LowerIntrinsicCall(), llvm::UpgradeIntrinsicCall(), and llvm::SelectionDAGLowering::visitCall().

Value* llvm::CallInst::getCalledValue (  )  [inline]

Definition at line 551 of file Instructions.h.

References llvm::UnaryInstruction::getOperand().

const Value* llvm::CallInst::getCalledValue (  )  const [inline]

Definition at line 550 of file Instructions.h.

References llvm::UnaryInstruction::getOperand().

Referenced by llvm::CallArgsDescriptor::CallArgsDescriptor(), HandleInlinedInvoke(), and llvm::SelectionDAGLowering::visitCall().

unsigned llvm::CallInst::getCallingConv (  )  const [inline]

getCallingConv/setCallingConv - Get or set the calling convention of this function call.

Definition at line 537 of file Instructions.h.

References llvm::Value::SubclassData.

Referenced by HandleInlinedInvoke(), llvm::UpgradeIntrinsicCall(), and llvm::SelectionDAGLowering::visitCall().

bool llvm::CallInst::isTailCall (  )  const [inline]

Definition at line 530 of file Instructions.h.

References llvm::Value::SubclassData.

Referenced by llvm::UpgradeIntrinsicCall(), and llvm::SelectionDAGLowering::visitCall().

bool llvm::CallInst::mayWriteToMemory (  )  const [inline, virtual]

mayWriteToMemory - Return true if this instruction may modify memory.

Reimplemented from llvm::Instruction.

Definition at line 528 of file Instructions.h.

void llvm::CallInst::setCallingConv ( unsigned  CC  )  [inline]

Definition at line 538 of file Instructions.h.

References llvm::Value::SubclassData.

Referenced by llvm::UpgradeIntrinsicCall().

void llvm::CallInst::setTailCall ( bool  isTailCall = true  )  [inline]

Definition at line 531 of file Instructions.h.

References llvm::Value::SubclassData.

Referenced by llvm::JIT::runFunction(), and llvm::UpgradeIntrinsicCall().


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