LLVM API Documentation

llvm::CallInst Class Reference

#include <Instructions.h>

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

List of all members.

Public Member Functions

 ~CallInst ()
bool isTailCall () const
void setTailCall (bool isTC=true)
virtual CallInst * clone () const
 DECLARE_TRANSPARENT_OPERAND_ACCESSORS (Value)
 Provide fast operand accessors.
unsigned getCallingConv () const
void setCallingConv (unsigned CC)
const AttrListPtr & getAttributes () const
void setAttributes (const AttrListPtr &Attrs)
void addAttribute (unsigned i, Attributes attr)
 addAttribute - adds the attribute to the list of attributes.
void removeAttribute (unsigned i, Attributes attr)
 removeAttribute - removes the attribute from the list of attributes.
bool paramHasAttr (unsigned i, Attributes attr) const
 Determine whether the call or the callee has the given attribute.
unsigned getParamAlignment (unsigned i) const
 Extract the alignment for a call or parameter (0=unknown).
bool doesNotAccessMemory () const
 Determine if the call does not access memory.
void setDoesNotAccessMemory (bool NotAccessMemory=true)
bool onlyReadsMemory () const
 Determine if the call does not access or only reads memory.
void setOnlyReadsMemory (bool OnlyReadsMemory=true)
bool doesNotReturn () const
 Determine if the call cannot return.
void setDoesNotReturn (bool DoesNotReturn=true)
bool doesNotThrow () const
 Determine if the call cannot unwind.
void setDoesNotThrow (bool DoesNotThrow=true)
bool hasStructRetAttr () const
 Determine if the call returns a structure through first pointer argument.
bool hasByValArgument () const
 Determine if any call argument is an aggregate passed by value.
Function * getCalledFunction () const
const Value * getCalledValue () const
Value * getCalledValue ()

Static Public Member Functions

template<typename InputIterator>
static CallInst * Create (Value *Func, InputIterator ArgBegin, InputIterator ArgEnd, const std::string &NameStr="", Instruction *InsertBefore=0)
template<typename InputIterator>
static CallInst * Create (Value *Func, InputIterator ArgBegin, InputIterator ArgEnd, const std::string &NameStr, BasicBlock *InsertAtEnd)
static CallInst * Create (Value *F, Value *Actual, const std::string &NameStr="", Instruction *InsertBefore=0)
static CallInst * Create (Value *F, Value *Actual, const std::string &NameStr, BasicBlock *InsertAtEnd)
static CallInst * Create (Value *F, const std::string &NameStr="", Instruction *InsertBefore=0)
static CallInst * Create (Value *F, const std::string &NameStr, BasicBlock *InsertAtEnd)
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 984 of file Instructions.h.


Constructor & Destructor Documentation

CallInst::~CallInst (  ) 

Definition at line 276 of file Instructions.cpp.


Member Function Documentation

template<typename InputIterator>
static CallInst* llvm::CallInst::Create ( Value *  Func,
InputIterator  ArgBegin,
InputIterator  ArgEnd,
const std::string &  NameStr = "",
Instruction *  InsertBefore = 0 
) [inline, static]

template<typename InputIterator>
static CallInst* llvm::CallInst::Create ( Value *  Func,
InputIterator  ArgBegin,
InputIterator  ArgEnd,
const std::string &  NameStr,
BasicBlock *  InsertAtEnd 
) [inline, static]

Definition at line 1042 of file Instructions.h.

static CallInst* llvm::CallInst::Create ( Value *  F,
Value *  Actual,
const std::string &  NameStr = "",
Instruction *  InsertBefore = 0 
) [inline, static]

Definition at line 1048 of file Instructions.h.

static CallInst* llvm::CallInst::Create ( Value *  F,
Value *  Actual,
const std::string &  NameStr,
BasicBlock *  InsertAtEnd 
) [inline, static]

Definition at line 1053 of file Instructions.h.

static CallInst* llvm::CallInst::Create ( Value *  F,
const std::string &  NameStr = "",
Instruction *  InsertBefore = 0 
) [inline, static]

Definition at line 1057 of file Instructions.h.

static CallInst* llvm::CallInst::Create ( Value *  F,
const std::string &  NameStr,
BasicBlock *  InsertAtEnd 
) [inline, static]

Definition at line 1061 of file Instructions.h.

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

Definition at line 1068 of file Instructions.h.

Referenced by llvm::UpgradeIntrinsicCall(), and WriteInstruction().

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

Definition at line 1069 of file Instructions.h.

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

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 2902 of file Instructions.cpp.

References llvm::User::getNumOperands().

llvm::CallInst::DECLARE_TRANSPARENT_OPERAND_ACCESSORS ( Value   ) 

Provide fast operand accessors.

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

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

Definition at line 1080 of file Instructions.h.

Referenced by HandleInlinedInvoke(), llvm::UpgradeIntrinsicCall(), and WriteInstruction().

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

Definition at line 1081 of file Instructions.h.

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

const AttrListPtr& llvm::CallInst::getAttributes (  )  const [inline]

getAttributes - Return the parameter attributes for this call.

Definition at line 1087 of file Instructions.h.

Referenced by addAttribute(), HandleInlinedInvoke(), removeAttribute(), and WriteInstruction().

void llvm::CallInst::setAttributes ( const AttrListPtr &  Attrs  )  [inline]

setAttributes - Set the parameter attributes for this call.

Definition at line 1091 of file Instructions.h.

Referenced by addAttribute(), and removeAttribute().

void CallInst::addAttribute ( unsigned  i,
Attributes  attr 
)

addAttribute - adds the attribute to the list of attributes.

Definition at line 406 of file Instructions.cpp.

References llvm::AttrListPtr::addAttr(), getAttributes(), and setAttributes().

void CallInst::removeAttribute ( unsigned  i,
Attributes  attr 
)

removeAttribute - removes the attribute from the list of attributes.

Definition at line 412 of file Instructions.cpp.

References getAttributes(), llvm::AttrListPtr::removeAttr(), and setAttributes().

bool CallInst::paramHasAttr ( unsigned  i,
Attributes  attr 
) const

Determine whether the call or the callee has the given attribute.

Definition at line 418 of file Instructions.cpp.

References F, getCalledFunction(), and llvm::AttrListPtr::paramHasAttr().

unsigned llvm::CallInst::getParamAlignment ( unsigned  i  )  const [inline]

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

Definition at line 1103 of file Instructions.h.

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

Determine if the call does not access memory.

Definition at line 1108 of file Instructions.h.

References llvm::Attribute::ReadNone.

void llvm::CallInst::setDoesNotAccessMemory ( bool  NotAccessMemory = true  )  [inline]

Definition at line 1111 of file Instructions.h.

References llvm::Attribute::ReadNone.

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

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

Definition at line 1117 of file Instructions.h.

References llvm::Attribute::ReadOnly.

void llvm::CallInst::setOnlyReadsMemory ( bool  OnlyReadsMemory = true  )  [inline]

Definition at line 1120 of file Instructions.h.

References llvm::Attribute::ReadNone, and llvm::Attribute::ReadOnly.

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

Determine if the call cannot return.

Definition at line 1126 of file Instructions.h.

References llvm::Attribute::NoReturn.

void llvm::CallInst::setDoesNotReturn ( bool  DoesNotReturn = true  )  [inline]

Definition at line 1129 of file Instructions.h.

References llvm::Attribute::NoReturn.

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

Determine if the call cannot unwind.

Definition at line 1135 of file Instructions.h.

References llvm::Attribute::NoUnwind.

Referenced by HandleInlinedInvoke().

void llvm::CallInst::setDoesNotThrow ( bool  DoesNotThrow = true  )  [inline]

Definition at line 1138 of file Instructions.h.

References llvm::Attribute::NoUnwind.

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

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

Definition at line 1145 of file Instructions.h.

References llvm::Attribute::StructRet.

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

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

Definition at line 1151 of file Instructions.h.

References llvm::Attribute::ByVal.

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

getCalledFunction - Return the function called, or null if this is an indirect function invocation.

Definition at line 1158 of file Instructions.h.

References llvm::dyn_cast().

Referenced by llvm::IntrinsicInst::classof(), llvm::IntrinsicInst::getIntrinsicID(), llvm::IntrinsicLowering::LowerIntrinsicCall(), LowerPartSelect(), LowerPartSet(), paramHasAttr(), and llvm::UpgradeIntrinsicCall().

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

getCalledValue - Get a pointer to the function that is invoked by this instruction

Definition at line 1164 of file Instructions.h.

Referenced by llvm::X86TargetAsmInfo< BaseTAI >::ExpandInlineAsm(), and HandleInlinedInvoke().

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

Definition at line 1165 of file Instructions.h.

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

Reimplemented in llvm::IntrinsicInst.

Definition at line 1168 of file Instructions.h.

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

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

Reimplemented from llvm::Instruction.

Definition at line 1169 of file Instructions.h.

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

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


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