LLVM API Documentation
#include <CallSite.h>
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) | |
| CallSite & | operator= (const CallSite &CS) |
| bool | operator== (const CallSite &CS) const |
| bool | operator!= (const CallSite &CS) const |
| unsigned | getCallingConv () const |
| void | setCallingConv (unsigned CC) |
| const AttrListPtr & | getAttributes () const |
| void | setAttributes (const AttrListPtr &PAL) |
| bool | paramHasAttr (uint16_t i, Attributes 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. | |
| void | setDoesNotAccessMemory (bool doesNotAccessMemory=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) |
| const Type * | getType () const |
| bool | isCall () const |
| bool | isInvoke () const |
| Instruction * | getInstruction () const |
| Function * | getCaller () const |
| Value * | getCalledValue () const |
| Function * | getCalledFunction () const |
| void | setCalledFunction (Value *V) |
| Value * | getArgument (unsigned ArgNo) const |
| void | setArgument (unsigned ArgNo, Value *newVal) |
| unsigned | getArgumentNo (unsigned OperandNo) const |
| 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 |
| bool | isCallee (Value::use_iterator UI) const |
Static Public Member Functions | |
| static CallSite | get (Value *V) |
Definition at line 36 of file CallSite.h.
arg_iterator - The type of iterator to use when looping over actual arguments at this call site...
Definition at line 165 of file CallSite.h.
| llvm::CallSite::CallSite | ( | ) | [inline] |
| llvm::CallSite::CallSite | ( | CallInst * | CI | ) | [inline] |
Definition at line 40 of file CallSite.h.
| llvm::CallSite::CallSite | ( | InvokeInst * | II | ) | [inline] |
Definition at line 41 of file CallSite.h.
| CallSite::CallSite | ( | Instruction * | C | ) |
Definition at line 41 of file Instructions.cpp.
| llvm::CallSite::CallSite | ( | const CallSite & | CS | ) | [inline] |
Definition at line 43 of file CallSite.h.
| bool llvm::CallSite::operator== | ( | const CallSite & | CS | ) | const [inline] |
| bool llvm::CallSite::operator!= | ( | const CallSite & | CS | ) | const [inline] |
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 54 of file CallSite.h.
References Call, CallSite(), and V.
Referenced by AddressIsTaken(), AllCalleesPassInValidPointerForArgument(), llvm::AliasSetTracker::deleteValue(), llvm::MemoryDependenceAnalysis::getDependency(), llvm::BasicInlinerImpl::inlineFunctions(), llvm::PointerMayBeCaptured(), llvm::Inliner::runOnSCC(), and UpdateCallGraphAfterInlining().
| unsigned CallSite::getCallingConv | ( | ) | const |
getCallingConv/setCallingConv - get or set the calling convention of the call.
Definition at line 46 of file Instructions.cpp.
References CALLSITE_DELEGATE_GETTER.
Referenced by llvm::SelectionDAGLowering::LowerCallTo().
| void CallSite::setCallingConv | ( | unsigned | CC | ) |
Definition at line 49 of file Instructions.cpp.
References CALLSITE_DELEGATE_SETTER.
Referenced by ChangeCalleesToFastCall().
| const AttrListPtr & CallSite::getAttributes | ( | ) | const |
getAttributes/setAttributes - get or set the parameter attributes of the call.
Definition at line 52 of file Instructions.cpp.
References CALLSITE_DELEGATE_GETTER.
Referenced by LLVMAddInstrAttribute(), LLVMRemoveInstrAttribute(), LLVMSetInstrParamAlignment(), and RemoveNestAttribute().
| void CallSite::setAttributes | ( | const AttrListPtr & | PAL | ) |
Definition at line 55 of file Instructions.cpp.
References CALLSITE_DELEGATE_SETTER.
Referenced by LLVMAddInstrAttribute(), LLVMRemoveInstrAttribute(), LLVMSetInstrParamAlignment(), and RemoveNestAttribute().
| bool CallSite::paramHasAttr | ( | uint16_t | i, | |
| Attributes | attr | |||
| ) | const |
paramHasAttr - whether the call or the callee has the given attribute.
Definition at line 58 of file Instructions.cpp.
References CALLSITE_DELEGATE_GETTER.
Referenced by isSafeToEliminateVarargsCast(), llvm::SelectionDAGLowering::LowerCallTo(), llvm::PointerMayBeCaptured(), and llvm::Interpreter::visitCallSite().
| uint16_t CallSite::getParamAlignment | ( | uint16_t | i | ) | const |
Extract the alignment for a call or parameter (0=unknown).
Definition at line 61 of file Instructions.cpp.
References CALLSITE_DELEGATE_GETTER.
Referenced by llvm::SelectionDAGLowering::LowerCallTo().
| bool CallSite::doesNotAccessMemory | ( | ) | const |
Determine if the call does not access memory.
Definition at line 64 of file Instructions.cpp.
References CALLSITE_DELEGATE_GETTER.
Referenced by llvm::AliasAnalysis::getModRefBehavior().
| void CallSite::setDoesNotAccessMemory | ( | bool | doesNotAccessMemory = true |
) |
| bool CallSite::onlyReadsMemory | ( | ) | const |
Determine if the call does not access or only reads memory.
Definition at line 70 of file Instructions.cpp.
References CALLSITE_DELEGATE_GETTER.
Referenced by llvm::AliasAnalysis::getModRefBehavior(), and llvm::PointerMayBeCaptured().
| void CallSite::setOnlyReadsMemory | ( | bool | onlyReadsMemory = true |
) |
| bool CallSite::doesNotReturn | ( | ) | const |
Determine if the call cannot return.
Definition at line 76 of file Instructions.cpp.
References CALLSITE_DELEGATE_GETTER.
| void CallSite::setDoesNotReturn | ( | bool | doesNotReturn = true |
) |
| bool CallSite::doesNotThrow | ( | ) | const |
Determine if the call cannot unwind.
Definition at line 82 of file Instructions.cpp.
References CALLSITE_DELEGATE_GETTER.
Referenced by llvm::InlineFunction().
| void CallSite::setDoesNotThrow | ( | bool | doesNotThrow = true |
) |
| const Type* llvm::CallSite::getType | ( | ) | const [inline] |
getType - Return the type of the instruction that generated this call site
Definition at line 98 of file CallSite.h.
References getInstruction(), and llvm::Value::getType().
Referenced by llvm::SelectionDAGLowering::LowerCallTo().
| bool llvm::CallSite::isCall | ( | ) | const [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 103 of file CallSite.h.
| bool llvm::CallSite::isInvoke | ( | ) | const [inline] |
isInvoke - true if a InvokeInst is enclosed.
Definition at line 107 of file CallSite.h.
References getInstruction().
| Instruction* llvm::CallSite::getInstruction | ( | ) | const [inline] |
getInstruction - Return the instruction this call site corresponds to
Definition at line 111 of file CallSite.h.
Referenced by AllCalleesPassInValidPointerForArgument(), arg_begin(), arg_end(), llvm::AliasSetTracker::deleteValue(), getCalledValue(), getCaller(), llvm::InlineCostAnalyzer::getInlineCost(), llvm::MemoryDependenceAnalysis::getNonLocalCallDependency(), getType(), llvm::InlineFunction(), llvm::BasicInlinerImpl::inlineFunctions(), isCallee(), isInvoke(), llvm::SelectionDAGLowering::LowerCallTo(), operator<(), llvm::Inliner::runOnSCC(), setArgument(), setCalledFunction(), SpecializeFunction(), UpdateCallGraphAfterInlining(), and llvm::Interpreter::visitCallSite().
| Function* llvm::CallSite::getCaller | ( | ) | const [inline] |
getCaller - Return the caller function for this call site
Definition at line 115 of file CallSite.h.
References getInstruction(), llvm::BasicBlock::getParent(), and llvm::Instruction::getParent().
Referenced by InlineCallIfPossible(), and llvm::Inliner::runOnSCC().
| Value* llvm::CallSite::getCalledValue | ( | ) | const [inline] |
getCalledValue - Return the pointer to function that is being called...
Definition at line 120 of file CallSite.h.
References getInstruction(), and llvm::User::getOperand().
Referenced by getCalledFunction(), llvm::SelectionDAGLowering::LowerCallTo(), and llvm::Interpreter::visitCallSite().
| 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 128 of file CallSite.h.
References llvm::dyn_cast(), and getCalledValue().
Referenced by llvm::InlineCostAnalyzer::getInlineCost(), llvm::InlineCostAnalyzer::getInlineFudgeFactor(), llvm::AliasAnalysis::getModRefBehavior(), llvm::LibCallAliasAnalysis::getModRefInfo(), InlineCallIfPossible(), llvm::InlineFunction(), llvm::BasicInlinerImpl::inlineFunctions(), llvm::Inliner::runOnSCC(), SpecializeFunction(), UpdateCallGraphAfterInlining(), and llvm::Interpreter::visitCallSite().
| void llvm::CallSite::setCalledFunction | ( | Value * | V | ) | [inline] |
setCalledFunction - Set the callee to the specified value...
Definition at line 134 of file CallSite.h.
References getInstruction(), and llvm::User::setOperand().
Definition at line 139 of file CallSite.h.
References arg_begin(), and arg_end().
Referenced by AllCalleesPassInValidPointerForArgument(), and SpecializeFunction().
Definition at line 144 of file CallSite.h.
References arg_begin(), arg_end(), getInstruction(), and llvm::User::setOperand().
Given an operand number, returns the argument that corresponds to it. OperandNo must be a valid operand number that actually corresponds to an argument.
Definition at line 153 of file CallSite.h.
| 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 89 of file Instructions.cpp.
References AI, arg_begin(), arg_end(), and E.
Referenced by AddressIsTaken().
| 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 169 of file CallSite.h.
References getInstruction(), and llvm::User::op_begin().
Referenced by arg_empty(), arg_size(), getArgument(), llvm::InlineCostAnalyzer::getInlineCost(), hasArgument(), llvm::InlineFunction(), llvm::SelectionDAGLowering::LowerCallTo(), llvm::PointerMayBeCaptured(), setArgument(), and llvm::Interpreter::visitCallSite().
| arg_iterator llvm::CallSite::arg_end | ( | ) | const [inline] |
Definition at line 175 of file CallSite.h.
References getInstruction(), and llvm::User::op_end().
Referenced by arg_empty(), arg_size(), getArgument(), llvm::InlineCostAnalyzer::getInlineCost(), hasArgument(), llvm::SelectionDAGLowering::LowerCallTo(), llvm::PointerMayBeCaptured(), setArgument(), and llvm::Interpreter::visitCallSite().
| bool llvm::CallSite::arg_empty | ( | ) | const [inline] |
| unsigned llvm::CallSite::arg_size | ( | ) | const [inline] |
Definition at line 177 of file CallSite.h.
References arg_begin(), and arg_end().
Referenced by llvm::InlineFunction(), llvm::SelectionDAGLowering::LowerCallTo(), SpecializeFunction(), and llvm::Interpreter::visitCallSite().
| bool llvm::CallSite::operator< | ( | const CallSite & | CS | ) | const [inline] |
| bool llvm::CallSite::isCallee | ( | Value::use_iterator | UI | ) | const [inline] |
Definition at line 183 of file CallSite.h.
References getInstruction(), llvm::value_use_iterator< UserTy >::getUse(), and llvm::User::op_begin().