LLVM  13.0.0git
Public Member Functions | List of all members
llvm::StatepointOpers Class Reference

MI-level Statepoint operands. More...

#include "llvm/CodeGen/StackMaps.h"

Public Member Functions

 StatepointOpers (const MachineInstr *MI)
 
unsigned getIDPos () const
 Get index of statepoint ID operand. More...
 
unsigned getNBytesPos () const
 Get index of Num Patch Bytes operand. More...
 
unsigned getNCallArgsPos () const
 Get index of Num Call Arguments operand. More...
 
unsigned getVarIdx () const
 Get starting index of non call related arguments (calling convention, statepoint flags, vm state and gc state). More...
 
unsigned getCCIdx () const
 Get index of Calling Convention operand. More...
 
unsigned getFlagsIdx () const
 Get index of Flags operand. More...
 
unsigned getNumDeoptArgsIdx () const
 Get index of Number Deopt Arguments operand. More...
 
uint64_t getID () const
 Return the ID for the given statepoint. More...
 
uint32_t getNumPatchBytes () const
 Return the number of patchable bytes the given statepoint should emit. More...
 
const MachineOperandgetCallTarget () const
 Return the target of the underlying call. More...
 
CallingConv::ID getCallingConv () const
 Return the calling convention. More...
 
uint64_t getFlags () const
 Return the statepoint flags. More...
 
uint64_t getNumDeoptArgs () const
 
unsigned getNumGcMapEntriesIdx ()
 Get index of number of gc map entries. More...
 
unsigned getNumAllocaIdx ()
 Get index of number of gc allocas. More...
 
unsigned getNumGCPtrIdx ()
 Get index of number of GC pointers. More...
 
int getFirstGCPtrIdx ()
 Get index of first GC pointer operand of -1 if there are none. More...
 
unsigned getGCPointerMap (SmallVectorImpl< std::pair< unsigned, unsigned >> &GCMap)
 Get vector of base/derived pairs from statepoint. More...
 

Detailed Description

MI-level Statepoint operands.

Statepoint operands take the form: <id>, <num patch bytes >, <num call arguments>, <call target>, [call arguments...], <StackMaps::ConstantOp>, <calling convention>, <StackMaps::ConstantOp>, <statepoint flags>, <StackMaps::ConstantOp>, <num deopt args>, [deopt args...], <StackMaps::ConstantOp>, <num gc pointer args>, [gc pointer args...], <StackMaps::ConstantOp>, <num gc allocas>, [gc allocas args...], <StackMaps::ConstantOp>, <num entries in gc map>, [base/derived pairs] base/derived pairs in gc map are logical indices into <gc pointer args> section. All gc pointers assigned to VRegs produce new value (in form of MI Def operand) and are tied to it.

Definition at line 158 of file StackMaps.h.

Constructor & Destructor Documentation

◆ StatepointOpers()

llvm::StatepointOpers::StatepointOpers ( const MachineInstr MI)
inlineexplicit

Definition at line 173 of file StackMaps.h.

References MI.

Member Function Documentation

◆ getCallingConv()

CallingConv::ID llvm::StatepointOpers::getCallingConv ( ) const
inline

Return the calling convention.

Definition at line 217 of file StackMaps.h.

References getCCIdx(), and MI.

◆ getCallTarget()

const MachineOperand& llvm::StatepointOpers::getCallTarget ( ) const
inline

Return the target of the underlying call.

Definition at line 212 of file StackMaps.h.

References MI.

◆ getCCIdx()

unsigned llvm::StatepointOpers::getCCIdx ( ) const
inline

Get index of Calling Convention operand.

Definition at line 193 of file StackMaps.h.

References getVarIdx().

Referenced by getCallingConv().

◆ getFirstGCPtrIdx()

int StatepointOpers::getFirstGCPtrIdx ( )

Get index of first GC pointer operand of -1 if there are none.

Definition at line 125 of file StackMaps.cpp.

References assert(), getConstMetaVal(), and getNumGCPtrIdx().

Referenced by llvm::MachineInstr::findTiedOperandIdx().

◆ getFlags()

uint64_t llvm::StatepointOpers::getFlags ( ) const
inline

Return the statepoint flags.

Definition at line 222 of file StackMaps.h.

References getFlagsIdx(), and MI.

Referenced by hasLiveThroughUse().

◆ getFlagsIdx()

unsigned llvm::StatepointOpers::getFlagsIdx ( ) const
inline

Get index of Flags operand.

Definition at line 196 of file StackMaps.h.

References getVarIdx().

Referenced by getFlags().

◆ getGCPointerMap()

unsigned StatepointOpers::getGCPointerMap ( SmallVectorImpl< std::pair< unsigned, unsigned >> &  GCMap)

Get vector of base/derived pairs from statepoint.

Elements are indices into GC Pointer operand list (logical). Returns number of elements in GCMap.

Definition at line 135 of file StackMaps.cpp.

References B, D, getConstMetaVal(), llvm::MachineOperand::getImm(), getNumGcMapEntriesIdx(), llvm::MachineInstr::getOperand(), and N.

◆ getID()

uint64_t llvm::StatepointOpers::getID ( ) const
inline

Return the ID for the given statepoint.

Definition at line 204 of file StackMaps.h.

References MI.

Referenced by llvm::StackMaps::recordStatepoint().

◆ getIDPos()

unsigned llvm::StatepointOpers::getIDPos ( ) const
inline

Get index of statepoint ID operand.

Definition at line 178 of file StackMaps.h.

◆ getNBytesPos()

unsigned llvm::StatepointOpers::getNBytesPos ( ) const
inline

Get index of Num Patch Bytes operand.

Definition at line 181 of file StackMaps.h.

◆ getNCallArgsPos()

unsigned llvm::StatepointOpers::getNCallArgsPos ( ) const
inline

Get index of Num Call Arguments operand.

Definition at line 184 of file StackMaps.h.

◆ getNumAllocaIdx()

unsigned StatepointOpers::getNumAllocaIdx ( )

Get index of number of gc allocas.

Definition at line 104 of file StackMaps.cpp.

References getConstMetaVal(), llvm::StackMaps::getNextMetaArgIdx(), and getNumGCPtrIdx().

Referenced by getNumGcMapEntriesIdx().

◆ getNumDeoptArgs()

uint64_t llvm::StatepointOpers::getNumDeoptArgs ( ) const
inline

Definition at line 224 of file StackMaps.h.

References getNumDeoptArgsIdx(), and MI.

◆ getNumDeoptArgsIdx()

unsigned llvm::StatepointOpers::getNumDeoptArgsIdx ( ) const
inline

Get index of Number Deopt Arguments operand.

Definition at line 199 of file StackMaps.h.

References getVarIdx().

Referenced by getNumDeoptArgs(), getNumGCPtrIdx(), and hasLiveThroughUse().

◆ getNumGcMapEntriesIdx()

unsigned StatepointOpers::getNumGcMapEntriesIdx ( )

Get index of number of gc map entries.

Definition at line 94 of file StackMaps.cpp.

References getConstMetaVal(), llvm::StackMaps::getNextMetaArgIdx(), and getNumAllocaIdx().

Referenced by getGCPointerMap().

◆ getNumGCPtrIdx()

unsigned StatepointOpers::getNumGCPtrIdx ( )

Get index of number of GC pointers.

Definition at line 114 of file StackMaps.cpp.

References getConstMetaVal(), llvm::StackMaps::getNextMetaArgIdx(), and getNumDeoptArgsIdx().

Referenced by getFirstGCPtrIdx(), getNumAllocaIdx(), and hasLiveThroughUse().

◆ getNumPatchBytes()

uint32_t llvm::StatepointOpers::getNumPatchBytes ( ) const
inline

Return the number of patchable bytes the given statepoint should emit.

Definition at line 207 of file StackMaps.h.

References MI.

Referenced by llvm::AArch64InstrInfo::getInstSizeInBytes().

◆ getVarIdx()

unsigned llvm::StatepointOpers::getVarIdx ( ) const
inline

Get starting index of non call related arguments (calling convention, statepoint flags, vm state and gc state).

Definition at line 188 of file StackMaps.h.

References MI.

Referenced by getCCIdx(), getFlagsIdx(), getNumDeoptArgsIdx(), and llvm::StackMaps::recordStatepoint().


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