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

A wrapper around a GC intrinsic call, this provides most of the actual functionality for Statepoint and ImmutableStatepoint. More...

#include "llvm/IR/Statepoint.h"

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

Public Types

enum  {
  IDPos = 0, NumPatchBytesPos = 1, CalledFunctionPos = 2, NumCallArgsPos = 3,
  FlagsPos = 4, CallArgsBeginPos = 5
}
 
using arg_iterator = typename CallBaseTy::const_op_iterator
 

Public Member Functions

void * operator new (size_t, unsigned)=delete
 
void * operator new (size_t s)=delete
 
 operator bool () const
 
CallBaseTy * getCall () const
 Return the underlying call instruction. 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
 
arg_iterator arg_begin () const
 
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...
 
arg_iterator gc_transition_args_begin () const
 
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...
 
arg_iterator deopt_begin () const
 
arg_iterator deopt_end () const
 
iterator_range< arg_iteratordeopt_operands () const
 range adapter for vm state arguments More...
 
arg_iterator gc_args_begin () const
 
arg_iterator gc_args_end () const
 
unsigned gcArgsStartIdx () const
 
iterator_range< arg_iteratorgc_args () const
 range adapter for gc arguments More...
 
std::vector< const GCRelocateInst * > getRelocates () const
 Get list of all gc reloactes linked to this statepoint May contain several relocations for the same base/derived pair. More...
 
const GCResultInstgetGCResult () 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 (CallBaseTy *Call)
 

Detailed Description

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

A wrapper around a GC intrinsic call, 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.

Definition at line 74 of file Statepoint.h.

Member Typedef Documentation

◆ arg_iterator

template<typename FunTy, typename InstructionTy, typename ValueTy, typename CallBaseTy>
using llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallBaseTy >::arg_iterator = typename CallBaseTy::const_op_iterator

Definition at line 87 of file Statepoint.h.

Member Enumeration Documentation

◆ anonymous enum

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

Definition at line 89 of file Statepoint.h.

Constructor & Destructor Documentation

◆ StatepointBase() [1/2]

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

Definition at line 78 of file Statepoint.h.

◆ StatepointBase() [2/2]

template<typename FunTy, typename InstructionTy, typename ValueTy, typename CallBaseTy>
llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallBaseTy >::StatepointBase ( CallBaseTy *  Call)
inlineexplicitprotected

Definition at line 82 of file Statepoint.h.

Member Function Documentation

◆ arg_begin()

template<typename FunTy, typename InstructionTy, typename ValueTy, typename CallBaseTy>
arg_iterator llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallBaseTy >::arg_begin ( ) const
inline

Definition at line 170 of file Statepoint.h.

◆ arg_end()

template<typename FunTy, typename InstructionTy, typename ValueTy, typename CallBaseTy>
arg_iterator llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallBaseTy >::arg_end ( ) const
inline

Definition at line 174 of file Statepoint.h.

◆ arg_size()

template<typename FunTy, typename InstructionTy, typename ValueTy, typename CallBaseTy>
size_t llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallBaseTy >::arg_size ( ) const
inline

Definition at line 169 of file Statepoint.h.

◆ call_args()

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

range adapter for call arguments

Definition at line 186 of file Statepoint.h.

◆ deopt_begin()

template<typename FunTy, typename InstructionTy, typename ValueTy, typename CallBaseTy>
arg_iterator llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallBaseTy >::deopt_begin ( ) const
inline

Definition at line 225 of file Statepoint.h.

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

◆ deopt_end()

template<typename FunTy, typename InstructionTy, typename ValueTy, typename CallBaseTy>
arg_iterator llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallBaseTy >::deopt_end ( ) const
inline

Definition at line 230 of file Statepoint.h.

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

◆ deopt_operands()

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

range adapter for vm state arguments

Definition at line 237 of file Statepoint.h.

◆ doesNotThrow()

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

Determine if the statepoint cannot unwind.

Definition at line 150 of file Statepoint.h.

◆ gc_args()

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

range adapter for gc arguments

Definition at line 249 of file Statepoint.h.

Referenced by insertParsePoints().

◆ gc_args_begin()

template<typename FunTy, typename InstructionTy, typename ValueTy, typename CallBaseTy>
arg_iterator llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallBaseTy >::gc_args_begin ( ) const
inline

Definition at line 241 of file Statepoint.h.

Referenced by insertParsePoints(), and llvm::SelectionDAGBuilder::LowerStatepoint().

◆ gc_args_end()

template<typename FunTy, typename InstructionTy, typename ValueTy, typename CallBaseTy>
arg_iterator llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallBaseTy >::gc_args_end ( ) const
inline

Definition at line 242 of file Statepoint.h.

Referenced by insertParsePoints(), and llvm::SelectionDAGBuilder::LowerStatepoint().

◆ gc_transition_args()

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

range adapter for GC transition arguments

Definition at line 214 of file Statepoint.h.

◆ gc_transition_args_begin()

template<typename FunTy, typename InstructionTy, typename ValueTy, typename CallBaseTy>
arg_iterator llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallBaseTy >::gc_transition_args_begin ( ) const
inline

Definition at line 202 of file Statepoint.h.

◆ gc_transition_args_end()

template<typename FunTy, typename InstructionTy, typename ValueTy, typename CallBaseTy>
arg_iterator llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallBaseTy >::gc_transition_args_end ( ) const
inline

Definition at line 207 of file Statepoint.h.

◆ gcArgsStartIdx()

template<typename FunTy, typename InstructionTy, typename ValueTy, typename CallBaseTy>
unsigned llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallBaseTy >::gcArgsStartIdx ( ) const
inline

Definition at line 244 of file Statepoint.h.

Referenced by makeStatepointExplicitImpl().

◆ getActualReturnType()

template<typename FunTy, typename InstructionTy, typename ValueTy, typename CallBaseTy>
Type* llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallBaseTy >::getActualReturnType ( ) const
inline

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

Definition at line 157 of file Statepoint.h.

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

◆ getArgument()

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

Definition at line 180 of file Statepoint.h.

◆ getCall()

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

Return the underlying call instruction.

Definition at line 107 of file Statepoint.h.

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

◆ getCalledFunction()

template<typename FunTy, typename InstructionTy, typename ValueTy, typename CallBaseTy>
FunTy* llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallBaseTy >::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 142 of file Statepoint.h.

◆ getCalledValue()

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

Return the value actually being called or invoked.

Definition at line 133 of file Statepoint.h.

Referenced by llvm::SelectionDAGBuilder::LowerCallSiteWithDeoptBundle(), and llvm::SelectionDAGBuilder::LowerStatepoint().

◆ getCaller()

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

Return the caller function for this statepoint.

Definition at line 147 of file Statepoint.h.

◆ getFlags()

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

Definition at line 112 of file Statepoint.h.

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

◆ getGCResult()

template<typename FunTy, typename InstructionTy, typename ValueTy, typename CallBaseTy>
const GCResultInst* llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallBaseTy >::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 262 of file Statepoint.h.

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

◆ getID()

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

Return the ID associated with this statepoint.

Definition at line 118 of file Statepoint.h.

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

◆ getInstruction()

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

Definition at line 138 of file Statepoint.h.

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

◆ getNumCallArgs()

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

Number of arguments to be passed to the actual callee.

Definition at line 164 of file Statepoint.h.

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

◆ getNumPatchBytes()

template<typename FunTy, typename InstructionTy, typename ValueTy, typename CallBaseTy>
uint32_t llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallBaseTy >::getNumPatchBytes ( ) const
inline

Return the number of patchable bytes associated with this statepoint.

Definition at line 124 of file Statepoint.h.

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

◆ getNumTotalGCTransitionArgs()

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

Number of GC transition args.

Definition at line 198 of file Statepoint.h.

◆ getNumTotalVMSArgs()

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

Number of additional arguments excluding those intended for garbage collection.

Definition at line 220 of file Statepoint.h.

◆ getRelocates()

template<typename FunTy , typename InstructionTy , typename ValueTy , typename CallBaseTy >
std::vector< const GCRelocateInst * > llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallBaseTy >::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 407 of file Statepoint.h.

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

◆ operator bool()

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

Definition at line 101 of file Statepoint.h.

◆ operator new() [1/2]

template<typename FunTy, typename InstructionTy, typename ValueTy, typename CallBaseTy>
void* llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallBaseTy >::operator new ( size_t  ,
unsigned   
)
delete

◆ operator new() [2/2]

template<typename FunTy, typename InstructionTy, typename ValueTy, typename CallBaseTy>
void* llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallBaseTy >::operator new ( size_t  s)
delete

◆ paramHasAttr()

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

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

Definition at line 191 of file Statepoint.h.

◆ verify()

template<typename FunTy, typename InstructionTy, typename ValueTy, typename CallBaseTy>
void llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallBaseTy >::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 273 of file Statepoint.h.

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


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