LLVM API Documentation

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

llvm::CallSite Class Reference

#include <CallSite.h>

Collaboration diagram for llvm::CallSite:

Collaboration graph
[legend]
List of all members.

Public Types

typedef User::op_iterator arg_iterator

Public Member Functions

 CallSite ()
 CallSite (CallInst *CI)
 CallSite (InvokeInst *II)
 CallSite (Instruction *C)
 CallSite (const CallSite &CS)
CallSiteoperator= (const CallSite &CS)
bool operator== (const CallSite &CS) const
bool operator!= (const CallSite &CS) const
unsigned getCallingConv () const
void setCallingConv (unsigned CC)
const PAListPtrgetParamAttrs () const
void setParamAttrs (const PAListPtr &PAL)
bool paramHasAttr (uint16_t i, ParameterAttributes attr) const
 paramHasAttr - whether the call or the callee has the given attribute.
uint16_t getParamAlignment (uint16_t i) const
 Extract the alignment for a call or parameter (0=unknown).
bool doesNotAccessMemory () const
 Determine if the call does not access memory.
bool onlyReadsMemory () const
 Determine if the call does not access or only reads memory.
bool doesNotThrow () const
 Determine if the call cannot unwind.
void setDoesNotThrow (bool doesNotThrow=true)
const TypegetType () const
InstructiongetInstruction () const
FunctiongetCaller () const
ValuegetCalledValue () const
FunctiongetCalledFunction () const
void setCalledFunction (Value *V)
ValuegetArgument (unsigned ArgNo) const
void setArgument (unsigned ArgNo, Value *newVal)
bool hasArgument (const Value *Arg) const
arg_iterator arg_begin () const
arg_iterator arg_end () const
bool arg_empty () const
unsigned arg_size () const
bool operator< (const CallSite &CS) const

Static Public Member Functions

CallSite get (Value *V)

Member Typedef Documentation

typedef User::op_iterator llvm::CallSite::arg_iterator
 

arg_iterator - The type of iterator to use when looping over actual arguments at this call site...

Definition at line 139 of file CallSite.h.

Referenced by AddressIsTaken(), CallPassesValueThoughVararg(), llvm::InlineCostAnalyzer::getInlineCost(), BasicAliasAnalysis::getModRefInfo(), hasArgument(), llvm::InlineFunction(), llvm::SelectionDAGLowering::LowerCallTo(), DAE::runOnModule(), and llvm::Interpreter::visitCallSite().


Constructor & Destructor Documentation

llvm::CallSite::CallSite  )  [inline]
 

Definition at line 35 of file CallSite.h.

llvm::CallSite::CallSite CallInst CI  )  [inline]
 

Definition at line 36 of file CallSite.h.

llvm::CallSite::CallSite InvokeInst II  )  [inline]
 

Definition at line 37 of file CallSite.h.

CallSite::CallSite Instruction C  ) 
 

Definition at line 28 of file Instructions.cpp.

llvm::CallSite::CallSite const CallSite CS  )  [inline]
 

Definition at line 39 of file CallSite.h.


Member Function Documentation

arg_iterator llvm::CallSite::arg_begin  )  const [inline]
 

arg_begin/arg_end - Return iterators corresponding to the actual argument list for a call site.

Definition at line 144 of file CallSite.h.

References llvm::Instruction::getOpcode(), and llvm::User::op_begin().

Referenced by AddressIsTaken(), CallPassesValueThoughVararg(), llvm::InlineCostAnalyzer::getInlineCost(), BasicAliasAnalysis::getModRefInfo(), hasArgument(), llvm::InlineFunction(), llvm::SelectionDAGLowering::LowerCallTo(), RaiseAllocations::runOnModule(), DAE::runOnModule(), and llvm::Interpreter::visitCallSite().

bool llvm::CallSite::arg_empty  )  const [inline]
 

Definition at line 152 of file CallSite.h.

Referenced by RaiseAllocations::runOnModule().

arg_iterator llvm::CallSite::arg_end  )  const [inline]
 

Definition at line 151 of file CallSite.h.

References llvm::User::op_end().

Referenced by AddressIsTaken(), CallPassesValueThoughVararg(), llvm::InlineCostAnalyzer::getInlineCost(), BasicAliasAnalysis::getModRefInfo(), hasArgument(), llvm::SelectionDAGLowering::LowerCallTo(), and llvm::Interpreter::visitCallSite().

unsigned llvm::CallSite::arg_size  )  const [inline]
 

Definition at line 153 of file CallSite.h.

Referenced by llvm::InlineFunction(), llvm::SelectionDAGLowering::LowerCallTo(), Verifier::VerifyCallSite(), and llvm::Interpreter::visitCallSite().

bool CallSite::doesNotAccessMemory  )  const
 

Determine if the call does not access memory.

Definition at line 69 of file Instructions.cpp.

References llvm::CallInst::doesNotAccessMemory().

Referenced by llvm::AliasAnalysis::getModRefBehavior().

bool CallSite::doesNotThrow  )  const
 

Determine if the call cannot unwind.

Definition at line 81 of file Instructions.cpp.

References llvm::CallInst::doesNotThrow().

Referenced by llvm::InlineFunction().

CallSite llvm::CallSite::get Value V  )  [inline, static]
 

CallSite::get - This static method is sort of like a constructor. It will create an appropriate call site for a Call or Invoke instruction, but it can also create a null initialized CallSite object for something which is NOT a call site.

Definition at line 50 of file CallSite.h.

References llvm::Instruction::getOpcode().

Referenced by llvm::AliasSetTracker::deleteValue(), llvm::MemoryDependenceAnalysis::getDependency(), and llvm::Inliner::runOnSCC().

Value* llvm::CallSite::getArgument unsigned  ArgNo  )  const [inline]
 

Definition at line 119 of file CallSite.h.

Referenced by AllCalleesPassInValidPointerForArgument(), Verifier::VerifyCallSite(), and llvm::SelectionDAGLowering::visitInlineAsm().

Function* llvm::CallSite::getCalledFunction  )  const [inline]
 

getCalledFunction - Return the function being called if this is a direct call, otherwise return null (if it's an indirect call).

Definition at line 108 of file CallSite.h.

Referenced by llvm::InlineCostAnalyzer::getInlineCost(), llvm::InlineCostAnalyzer::getInlineFudgeFactor(), llvm::AliasAnalysis::getModRefBehavior(), llvm::LibCallAliasAnalysis::getModRefInfo(), GlobalsModRef::getModRefInfo(), Andersens::getModRefInfo(), InlineCallIfPossible(), llvm::InlineFunction(), llvm::BasicInlinerImpl::inlineFunctions(), RaiseAllocations::runOnModule(), DAE::runOnModule(), llvm::Inliner::runOnSCC(), and llvm::Interpreter::visitCallSite().

Value* llvm::CallSite::getCalledValue  )  const [inline]
 

getCalledValue - Return the pointer to function that is being called...

Definition at line 100 of file CallSite.h.

References llvm::User::getOperand().

Referenced by CallPassesValueThoughVararg(), llvm::SelectionDAGLowering::LowerCallTo(), RaiseAllocations::runOnModule(), Verifier::VerifyCallSite(), llvm::Interpreter::visitCallSite(), and llvm::SelectionDAGLowering::visitInlineAsm().

Function* llvm::CallSite::getCaller  )  const [inline]
 

getCaller - Return the caller function for this call site

Definition at line 96 of file CallSite.h.

References llvm::BasicBlock::getParent(), and llvm::Instruction::getParent().

unsigned CallSite::getCallingConv  )  const
 

getCallingConv/setCallingConv - get or set the calling convention of the call.

Definition at line 32 of file Instructions.cpp.

References llvm::CallInst::getCallingConv().

Referenced by llvm::SelectionDAGLowering::LowerCallTo().

Instruction* llvm::CallSite::getInstruction  )  const [inline]
 

getInstruction - Return the instruction this call site corresponds to

Definition at line 92 of file CallSite.h.

Referenced by AllCalleesPassInValidPointerForArgument(), llvm::AliasSetTracker::deleteValue(), llvm::MemoryDependenceAnalysis::getDependency(), llvm::InlineCostAnalyzer::getInlineCost(), BasicAliasAnalysis::getModRefInfo(), AliasAnalysisCounter::getModRefInfo(), llvm::InlineFunction(), llvm::BasicInlinerImpl::inlineFunctions(), isOnlyADirectCall(), llvm::SelectionDAGLowering::LowerCallTo(), operator<(), AAEval::runOnFunction(), RaiseAllocations::runOnModule(), DAE::runOnModule(), llvm::Inliner::runOnSCC(), Verifier::VerifyCallSite(), llvm::Interpreter::visitCallSite(), and llvm::SelectionDAGLowering::visitInlineAsm().

uint16_t CallSite::getParamAlignment uint16_t  i  )  const
 

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

Definition at line 62 of file Instructions.cpp.

References llvm::CallInst::getParamAlignment().

Referenced by llvm::SelectionDAGLowering::LowerCallTo().

const PAListPtr & CallSite::getParamAttrs  )  const
 

getParamAttrs/setParamAttrs - get or set the parameter attributes of the call.

Definition at line 44 of file Instructions.cpp.

References llvm::PAListPtr::getParamAttrs(), and llvm::CallInst::getParamAttrs().

Referenced by RemoveNestAttribute(), and Verifier::VerifyCallSite().

const Type* llvm::CallSite::getType  )  const [inline]
 

getType - Return the type of the instruction that generated this call site

Definition at line 88 of file CallSite.h.

References llvm::Value::getType().

Referenced by llvm::SelectionDAGLowering::LowerCallTo(), and llvm::SelectionDAGLowering::visitInlineAsm().

bool CallSite::hasArgument const Value Arg  )  const
 

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

Definition at line 94 of file Instructions.cpp.

References arg_begin(), arg_end(), arg_iterator, and llvm::Use::get().

Referenced by isOnlyADirectCall().

bool CallSite::onlyReadsMemory  )  const
 

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

Definition at line 75 of file Instructions.cpp.

References llvm::CallInst::onlyReadsMemory().

Referenced by llvm::AliasAnalysis::getModRefBehavior().

bool llvm::CallSite::operator!= const CallSite CS  )  const [inline]
 

Definition at line 43 of file CallSite.h.

References I.

bool llvm::CallSite::operator< const CallSite CS  )  const [inline]
 

Definition at line 155 of file CallSite.h.

References getInstruction().

CallSite& llvm::CallSite::operator= const CallSite CS  )  [inline]
 

Definition at line 40 of file CallSite.h.

References I.

bool llvm::CallSite::operator== const CallSite CS  )  const [inline]
 

Definition at line 42 of file CallSite.h.

References I.

bool CallSite::paramHasAttr uint16_t  i,
ParameterAttributes  attr
const
 

paramHasAttr - whether the call or the callee has the given attribute.

Definition at line 56 of file Instructions.cpp.

References llvm::ParameterAttributes, and llvm::CallInst::paramHasAttr().

Referenced by isSafeToEliminateVarargsCast(), llvm::SelectionDAGLowering::LowerCallTo(), and llvm::Interpreter::visitCallSite().

void llvm::CallSite::setArgument unsigned  ArgNo,
Value newVal
[inline]
 

Definition at line 124 of file CallSite.h.

References llvm::Instruction::getOpcode(), and llvm::User::setOperand().

void llvm::CallSite::setCalledFunction Value V  )  [inline]
 

setCalledFunction - Set the callee to the specified value...

Definition at line 114 of file CallSite.h.

References llvm::User::setOperand().

void CallSite::setCallingConv unsigned  CC  ) 
 

Definition at line 38 of file Instructions.cpp.

References llvm::CallInst::setCallingConv().

Referenced by ChangeCalleesToFastCall().

void CallSite::setDoesNotThrow bool  doesNotThrow = true  ) 
 

Definition at line 87 of file Instructions.cpp.

References llvm::CallInst::setDoesNotThrow().

void CallSite::setParamAttrs const PAListPtr PAL  ) 
 

Definition at line 50 of file Instructions.cpp.

References llvm::CallInst::setParamAttrs().

Referenced by RemoveNestAttribute().


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


This web site is hosted by the Computer Science Department at the University of Illinois at Urbana-Champaign.