LLVM API Documentation
#include <CallSite.h>
Public Types | |
typedef IterTy | arg_iterator |
Public Member Functions | |
CallSiteBase () | |
CallSiteBase (CallTy *CI) | |
CallSiteBase (InvokeTy *II) | |
CallSiteBase (ValTy *II) | |
bool | isCall () const |
bool | isInvoke () const |
InstrTy * | getInstruction () const |
InstrTy * | operator-> () const |
LLVM_EXPLICIT | operator bool () const |
ValTy * | getCalledValue () const |
FunTy * | getCalledFunction () const |
void | setCalledFunction (Value *V) |
bool | isCallee (value_use_iterator< UserTy > UI) const |
ValTy * | getArgument (unsigned ArgNo) const |
void | setArgument (unsigned ArgNo, Value *newVal) |
unsigned | getArgumentNo (value_use_iterator< UserTy > I) const |
IterTy | arg_begin () const |
IterTy | arg_end () const |
bool | arg_empty () const |
unsigned | arg_size () const |
Type * | getType () const |
FunTy * | getCaller () const |
CallingConv::ID | getCallingConv () const |
void | setCallingConv (CallingConv::ID CC) |
const AttributeSet & | getAttributes () const |
void | setAttributes (const AttributeSet &PAL) |
bool | hasFnAttr (Attribute::AttrKind A) const |
Return true if this function has the given attribute. More... | |
bool | paramHasAttr (unsigned i, Attribute::AttrKind A) const |
Return true if the call or the callee has the given attribute. More... | |
uint16_t | getParamAlignment (uint16_t i) const |
Extract the alignment for a call or parameter (0=unknown). More... | |
bool | isNoBuiltin () const |
Return true if the call should not be treated as a call to a builtin. 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... | |
void | setDoesNotAccessMemory () |
bool | onlyReadsMemory () const |
Determine if the call does not access or only reads memory. More... | |
void | setOnlyReadsMemory () |
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 | doesNotCapture (unsigned ArgNo) const |
Determine whether this argument is not captured. More... | |
bool | isByValArgument (unsigned ArgNo) const |
Determine whether this argument is passed by value. More... | |
bool | doesNotAccessMemory (unsigned ArgNo) const |
bool | onlyReadsMemory (unsigned ArgNo) const |
bool | hasArgument (const Value *Arg) const |
Static Protected Member Functions | |
static CallSiteBase | get (ValTy *V) |
Protected Attributes | |
PointerIntPair< InstrTy *, 1, bool > | I |
Definition at line 46 of file CallSite.h.
typedef IterTy llvm::CallSiteBase< FunTy, ValTy, UserTy, InstrTy, CallTy, InvokeTy, IterTy >::arg_iterator |
arg_iterator - The type of iterator to use when looping over actual arguments at this call site.
Definition at line 133 of file CallSite.h.
|
inline |
Definition at line 50 of file CallSite.h.
Referenced by llvm::CallSiteBase< Function, Value, User, Instruction, CallInst, InvokeInst, User::op_iterator >::get().
|
inline |
Definition at line 51 of file CallSite.h.
|
inline |
Definition at line 52 of file CallSite.h.
|
inline |
Definition at line 53 of file CallSite.h.
|
inline |
arg_begin/arg_end - Return iterators corresponding to the actual argument list for a call site.
Definition at line 137 of file CallSite.h.
Referenced by llvm::CallSiteBase< Function, Value, User, Instruction, CallInst, InvokeInst, User::op_iterator >::arg_empty(), llvm::CallSiteBase< Function, Value, User, Instruction, CallInst, InvokeInst, User::op_iterator >::arg_size(), llvm::AliasAnalysis::callCapturesBefore(), llvm::objcarc::CanAlterRefCount(), determinePointerReadAttrs(), llvm::CallSiteBase< Function, Value, User, Instruction, CallInst, InvokeInst, User::op_iterator >::getArgument(), llvm::CallSiteBase< Function, Value, User, Instruction, CallInst, InvokeInst, User::op_iterator >::getArgumentNo(), llvm::objcarc::GetCallSiteClass(), llvm::AliasAnalysis::getModRefInfo(), HandleCallsInBlockInlinedThroughInvoke(), llvm::CallSiteBase< Function, Value, User, Instruction, CallInst, InvokeInst, User::op_iterator >::hasArgument(), llvm::InlineFunction(), llvm::SelectionDAGBuilder::LowerCallTo(), llvm::IntrinsicLowering::LowerIntrinsicCall(), llvm::PointerMayBeCaptured(), ReplaceFPIntrinsicWithCall(), llvm::CallSiteBase< Function, Value, User, Instruction, CallInst, InvokeInst, User::op_iterator >::setArgument(), llvm::SimplifyInstruction(), and llvm::Interpreter::visitCallSite().
|
inline |
Definition at line 144 of file CallSite.h.
|
inline |
Definition at line 143 of file CallSite.h.
Referenced by llvm::CallSiteBase< Function, Value, User, Instruction, CallInst, InvokeInst, User::op_iterator >::arg_empty(), llvm::CallSiteBase< Function, Value, User, Instruction, CallInst, InvokeInst, User::op_iterator >::arg_size(), llvm::AliasAnalysis::callCapturesBefore(), llvm::objcarc::CanAlterRefCount(), determinePointerReadAttrs(), llvm::CallSiteBase< Function, Value, User, Instruction, CallInst, InvokeInst, User::op_iterator >::getArgument(), llvm::CallSiteBase< Function, Value, User, Instruction, CallInst, InvokeInst, User::op_iterator >::getArgumentNo(), llvm::objcarc::GetCallSiteClass(), llvm::AliasAnalysis::getModRefInfo(), HandleCallsInBlockInlinedThroughInvoke(), llvm::CallSiteBase< Function, Value, User, Instruction, CallInst, InvokeInst, User::op_iterator >::hasArgument(), llvm::SelectionDAGBuilder::LowerCallTo(), llvm::IntrinsicLowering::LowerIntrinsicCall(), llvm::PointerMayBeCaptured(), ReplaceFPIntrinsicWithCall(), llvm::CallSiteBase< Function, Value, User, Instruction, CallInst, InvokeInst, User::op_iterator >::setArgument(), llvm::SimplifyInstruction(), and llvm::Interpreter::visitCallSite().
|
inline |
Definition at line 145 of file CallSite.h.
Referenced by llvm::InlineFunction(), llvm::SelectionDAGBuilder::LowerCallTo(), OptimizeAwayTrappingUsesOfValue(), and llvm::Interpreter::visitCallSite().
|
inline |
Determine if the call does not access memory.
Definition at line 216 of file CallSite.h.
Referenced by llvm::AliasAnalysis::callCapturesBefore(), determinePointerReadAttrs(), and llvm::CallSiteBase< Function, Value, User, Instruction, CallInst, InvokeInst, User::op_iterator >::doesNotAccessMemory().
|
inline |
Definition at line 260 of file CallSite.h.
|
inline |
Determine whether this argument is not captured.
Definition at line 251 of file CallSite.h.
Referenced by llvm::AliasAnalysis::callCapturesBefore(), and llvm::PointerMayBeCaptured().
|
inline |
Determine if the call cannot return.
Definition at line 232 of file CallSite.h.
Referenced by llvm::CallSiteBase< Function, Value, User, Instruction, CallInst, InvokeInst, User::op_iterator >::doesNotReturn().
|
inline |
Determine if the call cannot unwind.
Definition at line 240 of file CallSite.h.
Referenced by llvm::CallSiteBase< Function, Value, User, Instruction, CallInst, InvokeInst, User::op_iterator >::doesNotThrow(), llvm::InlineFunction(), and llvm::PointerMayBeCaptured().
|
inlinestaticprotected |
CallSiteBase::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 CallSiteBase object for something which is NOT a call site.
Definition at line 60 of file CallSite.h.
|
inline |
Definition at line 111 of file CallSite.h.
Referenced by AllCallersPassInValidPointerForArgument(), getStoredPointerOperand(), llvm::PatternMatch::Argument_match< Opnd_t >::match(), OptimizeAwayTrappingUsesOfValue(), llvm::TargetLowering::ParseConstraints(), llvm::ObjectSizeOffsetVisitor::visitCallSite(), and llvm::ObjectSizeOffsetEvaluator::visitCallSite().
|
inline |
Given a value use iterator, returns the argument that corresponds to it. Iterator must actually correspond to an argument.
Definition at line 124 of file CallSite.h.
|
inline |
getAttributes/setAttributes - get or set the parameter attributes of the call.
Definition at line 179 of file CallSite.h.
Referenced by llvm::CallSiteBase< Function, Value, User, Instruction, CallInst, InvokeInst, User::op_iterator >::getAttributes(), LLVMAddInstrAttribute(), LLVMRemoveInstrAttribute(), LLVMSetInstrParamAlignment(), llvm::SelectionDAGBuilder::LowerCallTo(), and RemoveNestAttribute().
|
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 93 of file CallSite.h.
Referenced by llvm::CallGraphNode::addCalledFunction(), llvm::CodeMetrics::analyzeBasicBlock(), determinePointerReadAttrs(), getCalledFunction(), llvm::InlineCostAnalysis::getInlineCost(), llvm::Inliner::getInlineThreshold(), llvm::AliasAnalysis::getModRefBehavior(), llvm::LibCallAliasAnalysis::getModRefInfo(), InlineCallIfPossible(), llvm::InlineFunction(), llvm::InlineCostAnalysis::isInlineViable(), llvm::Inliner::runOnSCC(), UpdateCallGraphAfterInlining(), and llvm::Interpreter::visitCallSite().
|
inline |
getCalledValue - Return the pointer to function that is being called.
Definition at line 85 of file CallSite.h.
Referenced by llvm::CodeMetrics::analyzeBasicBlock(), llvm::CallSiteBase< Function, Value, User, Instruction, CallInst, InvokeInst, User::op_iterator >::getCalledFunction(), llvm::SelectionDAGBuilder::LowerCallTo(), OptimizeAwayTrappingUsesOfValue(), llvm::TargetLowering::ParseConstraints(), llvm::SimplifyInstruction(), and llvm::Interpreter::visitCallSite().
|
inline |
getCaller - Return the caller function for this call site
Definition at line 153 of file CallSite.h.
Referenced by llvm::InlineCostAnalysis::getInlineCost(), llvm::Inliner::getInlineThreshold(), InlineCallIfPossible(), and llvm::Inliner::runOnSCC().
|
inline |
getCallingConv/setCallingConv - get or set the calling convention of the call.
Definition at line 170 of file CallSite.h.
Referenced by computeBytesPoppedByCallee(), llvm::CallSiteBase< Function, Value, User, Instruction, CallInst, InvokeInst, User::op_iterator >::getCallingConv(), and llvm::SelectionDAGBuilder::LowerCallTo().
|
inline |
Definition at line 79 of file CallSite.h.
Referenced by llvm::CallGraphNode::addCalledFunction(), llvm::CallSiteBase< Function, Value, User, Instruction, CallInst, InvokeInst, User::op_iterator >::arg_begin(), llvm::AliasAnalysis::callCapturesBefore(), llvm::CallSiteBase< Function, Value, User, Instruction, CallInst, InvokeInst, User::op_iterator >::getArgumentNo(), getCalledFunction(), llvm::CallSiteBase< Function, Value, User, Instruction, CallInst, InvokeInst, User::op_iterator >::getCalledValue(), llvm::AliasAnalysis::getModRefInfo(), llvm::MemoryDependenceAnalysis::getNonLocalCallDependency(), llvm::NVPTXTargetLowering::getPrototype(), llvm::InlineFunction(), llvm::InlineCostAnalysis::isInlineViable(), llvm::isInTailCallPosition(), llvm::CallSiteBase< Function, Value, User, Instruction, CallInst, InvokeInst, User::op_iterator >::isInvoke(), llvm::SelectionDAGBuilder::LowerCallTo(), llvm::TargetLowering::LowerCallTo(), llvm::CallSite::operator<(), PrintModRefResults(), llvm::CallGraphNode::removeCallEdgeFor(), llvm::CallGraphNode::replaceCallEdge(), llvm::Inliner::runOnSCC(), llvm::CallSiteBase< Function, Value, User, Instruction, CallInst, InvokeInst, User::op_iterator >::setArgument(), llvm::CallSiteBase< Function, Value, User, Instruction, CallInst, InvokeInst, User::op_iterator >::setCalledFunction(), UpdateCallGraphAfterInlining(), llvm::Interpreter::visitCallSite(), llvm::ObjectSizeOffsetVisitor::visitCallSite(), llvm::InstVisitor< ObjectSizeOffsetVisitor, SizeOffsetType >::visitCallSite(), llvm::ObjectSizeOffsetEvaluator::visitCallSite(), and llvm::PtrUseVisitor< SliceBuilder >::visitCallSite().
|
inline |
Extract the alignment for a call or parameter (0=unknown).
Definition at line 197 of file CallSite.h.
Referenced by llvm::CallSiteBase< Function, Value, User, Instruction, CallInst, InvokeInst, User::op_iterator >::getParamAlignment(), and llvm::TargetLowering::ArgListEntry::setAttributes().
|
inline |
getType - Return the type of the instruction that generated this call site
Definition at line 149 of file CallSite.h.
Referenced by llvm::TargetLowering::ParseConstraints().
|
inline |
hasArgument - Returns true if this CallSite passes the given Value* as an argument to the called function.
Definition at line 271 of file CallSite.h.
|
inline |
Return true if this function has the given attribute.
Definition at line 187 of file CallSite.h.
Referenced by llvm::CallSiteBase< Function, Value, User, Instruction, CallInst, InvokeInst, User::op_iterator >::hasFnAttr(), hasNoAliasAttr(), and hasReturnsTwiceAttr().
|
inline |
Determine whether this argument is passed by value.
Definition at line 256 of file CallSite.h.
Referenced by llvm::AliasAnalysis::callCapturesBefore(), llvm::InlineFunction(), and isSafeToEliminateVarargsCast().
|
inline |
isCall - true if a CallInst is enclosed. Note that !isCall() does not mean it is an InvokeInst enclosed, it also could signify a NULL Instruction pointer.
Definition at line 73 of file CallSite.h.
Referenced by llvm::InlineCostAnalysis::isInlineViable(), llvm::PatternMatch::Argument_match< Opnd_t >::match(), and llvm::InstVisitor< ObjectSizeOffsetVisitor, SizeOffsetType >::visitCallSite().
|
inline |
isCallee - Determine whether the passed iterator points to the callee operand's Use.
Definition at line 107 of file CallSite.h.
Referenced by AddressIsTaken().
|
inline |
isInvoke - true if a InvokeInst is enclosed.
Definition at line 77 of file CallSite.h.
Referenced by llvm::InstVisitor< ObjectSizeOffsetVisitor, SizeOffsetType >::visitCallSite().
|
inline |
Return true if the call should not be treated as a call to a builtin.
Definition at line 203 of file CallSite.h.
Referenced by getCalledFunction(), and llvm::CallSiteBase< Function, Value, User, Instruction, CallInst, InvokeInst, User::op_iterator >::isNoBuiltin().
|
inline |
Return true if the call should not be inlined.
Definition at line 208 of file CallSite.h.
Referenced by llvm::CodeMetrics::analyzeBasicBlock(), llvm::InlineCostAnalysis::getInlineCost(), and llvm::CallSiteBase< Function, Value, User, Instruction, CallInst, InvokeInst, User::op_iterator >::isNoInline().
|
inline |
Determine if the call does not access or only reads memory.
Definition at line 224 of file CallSite.h.
Referenced by llvm::AliasAnalysis::callCapturesBefore(), determinePointerReadAttrs(), llvm::objcarc::GetCallSiteClass(), llvm::CallSiteBase< Function, Value, User, Instruction, CallInst, InvokeInst, User::op_iterator >::onlyReadsMemory(), and llvm::PointerMayBeCaptured().
|
inline |
Definition at line 264 of file CallSite.h.
|
inline |
Definition at line 81 of file CallSite.h.
|
inline |
Definition at line 80 of file CallSite.h.
|
inline |
Return true if the call or the callee has the given attribute.
Definition at line 192 of file CallSite.h.
Referenced by computeBytesPoppedByCallee(), llvm::CallSiteBase< Function, Value, User, Instruction, CallInst, InvokeInst, User::op_iterator >::doesNotAccessMemory(), llvm::CallSiteBase< Function, Value, User, Instruction, CallInst, InvokeInst, User::op_iterator >::doesNotCapture(), llvm::CallSiteBase< Function, Value, User, Instruction, CallInst, InvokeInst, User::op_iterator >::isByValArgument(), llvm::isNoAliasCall(), llvm::CallSiteBase< Function, Value, User, Instruction, CallInst, InvokeInst, User::op_iterator >::onlyReadsMemory(), llvm::CallSiteBase< Function, Value, User, Instruction, CallInst, InvokeInst, User::op_iterator >::paramHasAttr(), and llvm::TargetLowering::ArgListEntry::setAttributes().
|
inline |
Definition at line 116 of file CallSite.h.
Referenced by OptimizeAwayTrappingUsesOfValue().
|
inline |
Definition at line 182 of file CallSite.h.
Referenced by LLVMAddInstrAttribute(), LLVMRemoveInstrAttribute(), LLVMSetInstrParamAlignment(), RemoveNestAttribute(), and llvm::CallSiteBase< Function, Value, User, Instruction, CallInst, InvokeInst, User::op_iterator >::setAttributes().
|
inline |
setCalledFunction - Set the callee to the specified value.
Definition at line 99 of file CallSite.h.
Referenced by OptimizeAwayTrappingUsesOfValue().
|
inline |
Definition at line 173 of file CallSite.h.
Referenced by ChangeCalleesToFastCall(), and llvm::CallSiteBase< Function, Value, User, Instruction, CallInst, InvokeInst, User::op_iterator >::setCallingConv().
|
inline |
Definition at line 219 of file CallSite.h.
Referenced by llvm::CallSiteBase< Function, Value, User, Instruction, CallInst, InvokeInst, User::op_iterator >::setDoesNotAccessMemory().
|
inline |
Definition at line 235 of file CallSite.h.
Referenced by llvm::CallSiteBase< Function, Value, User, Instruction, CallInst, InvokeInst, User::op_iterator >::setDoesNotReturn().
|
inline |
Definition at line 243 of file CallSite.h.
Referenced by llvm::CallSiteBase< Function, Value, User, Instruction, CallInst, InvokeInst, User::op_iterator >::setDoesNotThrow().
|
inline |
Definition at line 211 of file CallSite.h.
Referenced by llvm::CallSiteBase< Function, Value, User, Instruction, CallInst, InvokeInst, User::op_iterator >::setIsNoInline().
|
inline |
Definition at line 227 of file CallSite.h.
Referenced by llvm::CallSiteBase< Function, Value, User, Instruction, CallInst, InvokeInst, User::op_iterator >::setOnlyReadsMemory().
|
protected |
Definition at line 48 of file CallSite.h.
Referenced by llvm::CallSiteBase< Function, Value, User, Instruction, CallInst, InvokeInst, User::op_iterator >::getInstruction(), llvm::CallSiteBase< Function, Value, User, Instruction, CallInst, InvokeInst, User::op_iterator >::isCall(), llvm::CallSiteBase< Function, Value, User, Instruction, CallInst, InvokeInst, User::op_iterator >::isInvoke(), llvm::CallSiteBase< Function, Value, User, Instruction, CallInst, InvokeInst, User::op_iterator >::operator bool(), llvm::CallSite::operator!=(), llvm::CallSiteBase< Function, Value, User, Instruction, CallInst, InvokeInst, User::op_iterator >::operator->(), and llvm::CallSite::operator==().