LLVM  3.7.0
Public Types | Public Member Functions | Protected Member Functions | List of all members
llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallSiteTy > Class Template Reference

Analogous to CallSiteBase, this provides most of the actual functionality for Statepoint and ImmutableStatepoint. More...

#include <Statepoint.h>

Inheritance diagram for llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallSiteTy >:
[legend]

Public Types

enum  {
  IDPos = 0, NumPatchBytesPos = 1, CalledFunctionPos = 2, NumCallArgsPos = 3,
  FlagsPos = 4, CallArgsBeginPos = 5
}
 
typedef CallSiteTy::arg_iterator arg_iterator
 

Public Member Functions

 operator bool () const
 
CallSiteTy getCallSite () const
 Return the underlying CallSite. More...
 
uint64_t getFlags () const
 
uint64_t getID () const
 Return the ID associated with this statepoint. More...
 
uint32_t getNumPatchBytes () const
 Return the number of patchable bytes associated with this statepoint. More...
 
ValueTy * getCalledValue () const
 Return the value actually being called or invoked. More...
 
InstructionTy * getInstruction () const
 
FunTy * getCalledFunction () const
 Return the function being called if this is a direct call, otherwise return null (if it's an indirect call). More...
 
FunTy * getCaller () const
 Return the caller function for this statepoint. More...
 
bool doesNotThrow () const
 Determine if the statepoint cannot unwind. More...
 
TypegetActualReturnType () const
 Return the type of the value returned by the call underlying the statepoint. More...
 
int getNumCallArgs () const
 Number of arguments to be passed to the actual callee. More...
 
size_t arg_size () const
 
CallSiteTy::arg_iterator arg_begin () const
 
CallSiteTy::arg_iterator arg_end () const
 
ValueTy * getArgument (unsigned Index)
 
iterator_range< arg_iteratorcall_args () const
 range adapter for call arguments More...
 
bool paramHasAttr (unsigned i, Attribute::AttrKind A) const
 Return true if the call or the callee has the given attribute. More...
 
int getNumTotalGCTransitionArgs () const
 Number of GC transition args. More...
 
CallSiteTy::arg_iterator gc_transition_args_begin () const
 
CallSiteTy::arg_iterator gc_transition_args_end () const
 
iterator_range< arg_iteratorgc_transition_args () const
 range adapter for GC transition arguments More...
 
int getNumTotalVMSArgs () const
 Number of additional arguments excluding those intended for garbage collection. More...
 
CallSiteTy::arg_iterator vm_state_begin () const
 
CallSiteTy::arg_iterator vm_state_end () const
 
iterator_range< arg_iteratorvm_state_args () const
 range adapter for vm state arguments More...
 
CallSiteTy::arg_iterator gc_args_begin () const
 
CallSiteTy::arg_iterator gc_args_end () const
 
iterator_range< arg_iteratorgc_args () const
 range adapter for gc arguments More...
 
std::vector< GCRelocateOperandsgetRelocates () const
 Get list of all gc reloactes linked to this statepoint May contain several relocations for the same base/derived pair. More...
 
InstructionTy * getGCResult () const
 Get the experimental_gc_result call tied to this statepoint. More...
 
void verify ()
 Asserts if this statepoint is malformed. More...
 

Protected Member Functions

 StatepointBase (InstructionTy *I)
 
 StatepointBase (CallSiteTy CS)
 

Detailed Description

template<typename FunTy, typename InstructionTy, typename ValueTy, typename CallSiteTy>
class llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallSiteTy >

Analogous to CallSiteBase, this provides most of the actual functionality for Statepoint and ImmutableStatepoint.

It is templatized to allow easily specializing of const and non-const concrete subtypes. This is structured analogous to CallSite rather than the IntrinsicInst.h helpers since we want to support invokable statepoints in the near future.

Definition at line 60 of file Statepoint.h.

Member Typedef Documentation

template<typename FunTy, typename InstructionTy, typename ValueTy, typename CallSiteTy>
typedef CallSiteTy::arg_iterator llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallSiteTy >::arg_iterator

Definition at line 78 of file Statepoint.h.

Member Enumeration Documentation

template<typename FunTy, typename InstructionTy, typename ValueTy, typename CallSiteTy>
anonymous enum
Enumerator
IDPos 
NumPatchBytesPos 
CalledFunctionPos 
NumCallArgsPos 
FlagsPos 
CallArgsBeginPos 

Definition at line 80 of file Statepoint.h.

Constructor & Destructor Documentation

template<typename FunTy, typename InstructionTy, typename ValueTy, typename CallSiteTy>
llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallSiteTy >::StatepointBase ( InstructionTy *  I)
inlineexplicitprotected

Definition at line 66 of file Statepoint.h.

template<typename FunTy, typename InstructionTy, typename ValueTy, typename CallSiteTy>
llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallSiteTy >::StatepointBase ( CallSiteTy  CS)
inlineexplicitprotected

Definition at line 72 of file Statepoint.h.

Member Function Documentation

template<typename FunTy, typename InstructionTy, typename ValueTy, typename CallSiteTy>
CallSiteTy::arg_iterator llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallSiteTy >::arg_begin ( ) const
inline
template<typename FunTy, typename InstructionTy, typename ValueTy, typename CallSiteTy>
CallSiteTy::arg_iterator llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallSiteTy >::arg_end ( ) const
inline
template<typename FunTy, typename InstructionTy, typename ValueTy, typename CallSiteTy>
size_t llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallSiteTy >::arg_size ( ) const
inline
template<typename FunTy, typename InstructionTy, typename ValueTy, typename CallSiteTy>
iterator_range<arg_iterator> llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallSiteTy >::call_args ( ) const
inline

range adapter for call arguments

Definition at line 175 of file Statepoint.h.

template<typename FunTy, typename InstructionTy, typename ValueTy, typename CallSiteTy>
bool llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallSiteTy >::doesNotThrow ( ) const
inline

Determine if the statepoint cannot unwind.

Definition at line 139 of file Statepoint.h.

template<typename FunTy, typename InstructionTy, typename ValueTy, typename CallSiteTy>
iterator_range<arg_iterator> llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallSiteTy >::gc_args ( ) const
inline

range adapter for gc arguments

Definition at line 239 of file Statepoint.h.

Referenced by insertParsePoints(), and lowerStatepointMetaArgs().

template<typename FunTy, typename InstructionTy, typename ValueTy, typename CallSiteTy>
CallSiteTy::arg_iterator llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallSiteTy >::gc_args_begin ( ) const
inline
template<typename FunTy, typename InstructionTy, typename ValueTy, typename CallSiteTy>
CallSiteTy::arg_iterator llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallSiteTy >::gc_args_end ( ) const
inline
template<typename FunTy, typename InstructionTy, typename ValueTy, typename CallSiteTy>
iterator_range<arg_iterator> llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallSiteTy >::gc_transition_args ( ) const
inline

range adapter for GC transition arguments

Definition at line 203 of file Statepoint.h.

Referenced by llvm::SelectionDAGBuilder::LowerStatepoint().

template<typename FunTy, typename InstructionTy, typename ValueTy, typename CallSiteTy>
CallSiteTy::arg_iterator llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallSiteTy >::gc_transition_args_begin ( ) const
inline
template<typename FunTy, typename InstructionTy, typename ValueTy, typename CallSiteTy>
CallSiteTy::arg_iterator llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallSiteTy >::gc_transition_args_end ( ) const
inline
template<typename FunTy, typename InstructionTy, typename ValueTy, typename CallSiteTy>
Type* llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallSiteTy >::getActualReturnType ( ) const
inline

Return the type of the value returned by the call underlying the statepoint.

Definition at line 146 of file Statepoint.h.

Referenced by lowerCallFromStatepoint().

template<typename FunTy, typename InstructionTy, typename ValueTy, typename CallSiteTy>
ValueTy* llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallSiteTy >::getArgument ( unsigned  Index)
inline

Definition at line 169 of file Statepoint.h.

template<typename FunTy, typename InstructionTy, typename ValueTy, typename CallSiteTy>
FunTy* llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallSiteTy >::getCalledFunction ( ) const
inline

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

Definition at line 131 of file Statepoint.h.

Referenced by llvm::StatepointBase< Function, Instruction, Value, CallSite >::doesNotThrow(), and llvm::StatepointBase< Function, Instruction, Value, CallSite >::paramHasAttr().

template<typename FunTy, typename InstructionTy, typename ValueTy, typename CallSiteTy>
ValueTy* llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallSiteTy >::getCalledValue ( ) const
inline
template<typename FunTy, typename InstructionTy, typename ValueTy, typename CallSiteTy>
FunTy* llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallSiteTy >::getCaller ( ) const
inline

Return the caller function for this statepoint.

Definition at line 136 of file Statepoint.h.

template<typename FunTy, typename InstructionTy, typename ValueTy, typename CallSiteTy>
CallSiteTy llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallSiteTy >::getCallSite ( ) const
inline
template<typename FunTy, typename InstructionTy, typename ValueTy, typename CallSiteTy>
uint64_t llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallSiteTy >::getFlags ( ) const
inline

Definition at line 100 of file Statepoint.h.

Referenced by llvm::SelectionDAGBuilder::LowerStatepoint().

template<typename FunTy, typename InstructionTy, typename ValueTy, typename CallSiteTy>
InstructionTy* llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallSiteTy >::getGCResult ( ) const
inline

Get the experimental_gc_result call tied to this statepoint.

Can be nullptr if there isn't a gc_result tied to this statepoint. Guaranteed to be a CallInst if non-null.

Definition at line 252 of file Statepoint.h.

template<typename FunTy, typename InstructionTy, typename ValueTy, typename CallSiteTy>
uint64_t llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallSiteTy >::getID ( ) const
inline

Return the ID associated with this statepoint.

Definition at line 106 of file Statepoint.h.

Referenced by llvm::SelectionDAGBuilder::LowerStatepoint().

template<typename FunTy, typename InstructionTy, typename ValueTy, typename CallSiteTy>
InstructionTy* llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallSiteTy >::getInstruction ( ) const
inline
template<typename FunTy, typename InstructionTy, typename ValueTy, typename CallSiteTy>
int llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallSiteTy >::getNumCallArgs ( ) const
inline
template<typename FunTy, typename InstructionTy, typename ValueTy, typename CallSiteTy>
uint32_t llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallSiteTy >::getNumPatchBytes ( ) const
inline

Return the number of patchable bytes associated with this statepoint.

Definition at line 112 of file Statepoint.h.

Referenced by llvm::SelectionDAGBuilder::LowerStatepoint().

template<typename FunTy, typename InstructionTy, typename ValueTy, typename CallSiteTy>
int llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallSiteTy >::getNumTotalGCTransitionArgs ( ) const
inline

Number of GC transition args.

Definition at line 187 of file Statepoint.h.

Referenced by llvm::StatepointBase< Function, Instruction, Value, CallSite >::gc_transition_args_end().

template<typename FunTy, typename InstructionTy, typename ValueTy, typename CallSiteTy>
int llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallSiteTy >::getNumTotalVMSArgs ( ) const
inline

Number of additional arguments excluding those intended for garbage collection.

Definition at line 210 of file Statepoint.h.

Referenced by lowerStatepointMetaArgs(), and llvm::StatepointBase< Function, Instruction, Value, CallSite >::vm_state_end().

template<typename FunTy , typename InstructionTy , typename ValueTy , typename CallSiteTy >
std::vector< GCRelocateOperands > llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallSiteTy >::getRelocates ( ) const

Get list of all gc reloactes linked to this statepoint May contain several relocations for the same base/derived pair.

For example this could happen due to relocations on unwinding path of invoke.

Definition at line 378 of file Statepoint.h.

References llvm::isGCRelocate(), users, and llvm::Value::users().

Referenced by getIncomingStatepointGCValues(), and lowerStatepointMetaArgs().

template<typename FunTy, typename InstructionTy, typename ValueTy, typename CallSiteTy>
llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallSiteTy >::operator bool ( ) const
inlineexplicit

Definition at line 89 of file Statepoint.h.

template<typename FunTy, typename InstructionTy, typename ValueTy, typename CallSiteTy>
bool llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallSiteTy >::paramHasAttr ( unsigned  i,
Attribute::AttrKind  A 
) const
inline

Return true if the call or the callee has the given attribute.

Definition at line 180 of file Statepoint.h.

template<typename FunTy, typename InstructionTy, typename ValueTy, typename CallSiteTy>
void llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallSiteTy >::verify ( )
inline

Asserts if this statepoint is malformed.

Common cases for failure include incorrect length prefixes for variable length sections or illegal values for parameters.

Definition at line 264 of file Statepoint.h.

Referenced by llvm::SelectionDAGBuilder::LowerStatepoint().

template<typename FunTy, typename InstructionTy, typename ValueTy, typename CallSiteTy>
iterator_range<arg_iterator> llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallSiteTy >::vm_state_args ( ) const
inline

range adapter for vm state arguments

Definition at line 227 of file Statepoint.h.

Referenced by insertParsePoints(), and lowerStatepointMetaArgs().

template<typename FunTy, typename InstructionTy, typename ValueTy, typename CallSiteTy>
CallSiteTy::arg_iterator llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallSiteTy >::vm_state_begin ( ) const
inline
template<typename FunTy, typename InstructionTy, typename ValueTy, typename CallSiteTy>
CallSiteTy::arg_iterator llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallSiteTy >::vm_state_end ( ) const
inline

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