LLVM 22.0.0git
|
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. | |
unsigned | getNBytesPos () const |
Get index of Num Patch Bytes operand. | |
unsigned | getNCallArgsPos () const |
Get index of Num Call Arguments operand. | |
unsigned | getVarIdx () const |
Get starting index of non call related arguments (calling convention, statepoint flags, vm state and gc state). | |
unsigned | getCCIdx () const |
Get index of Calling Convention operand. | |
unsigned | getFlagsIdx () const |
Get index of Flags operand. | |
unsigned | getNumDeoptArgsIdx () const |
Get index of Number Deopt Arguments operand. | |
uint64_t | getID () const |
Return the ID for the given statepoint. | |
uint32_t | getNumPatchBytes () const |
Return the number of patchable bytes the given statepoint should emit. | |
const MachineOperand & | getCallTarget () const |
Return the target of the underlying call. | |
CallingConv::ID | getCallingConv () const |
Return the calling convention. | |
uint64_t | getFlags () const |
Return the statepoint flags. | |
uint64_t | getNumDeoptArgs () const |
LLVM_ABI unsigned | getNumGcMapEntriesIdx () |
Get index of number of gc map entries. | |
LLVM_ABI unsigned | getNumAllocaIdx () |
Get index of number of gc allocas. | |
LLVM_ABI unsigned | getNumGCPtrIdx () |
Get index of number of GC pointers. | |
LLVM_ABI int | getFirstGCPtrIdx () |
Get index of first GC pointer operand of -1 if there are none. | |
LLVM_ABI unsigned | getGCPointerMap (SmallVectorImpl< std::pair< unsigned, unsigned > > &GCMap) |
Get vector of base/derived pairs from statepoint. | |
LLVM_ABI bool | isFoldableReg (Register Reg) const |
Return true if Reg is used only in operands which can be folded to stack usage. |
Static Public Member Functions | |
static LLVM_ABI bool | isFoldableReg (const MachineInstr *MI, Register Reg) |
Return true if Reg is used only in operands of MI which can be folded to stack usage and MI is a statepoint instruction. |
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 159 of file StackMaps.h.
|
inlineexplicit |
Definition at line 174 of file StackMaps.h.
Referenced by isFoldableReg().
|
inline |
|
inline |
Return the target of the underlying call.
Definition at line 213 of file StackMaps.h.
Referenced by llvm::LoongArchAsmPrinter::LowerSTATEPOINT().
|
inline |
Get index of Calling Convention operand.
Definition at line 194 of file StackMaps.h.
References getVarIdx().
Referenced by getCallingConv().
int StatepointOpers::getFirstGCPtrIdx | ( | ) |
Get index of first GC pointer operand of -1 if there are none.
Definition at line 124 of file StackMaps.cpp.
References assert(), getConstMetaVal(), and getNumGCPtrIdx().
Referenced by llvm::MachineInstr::findTiedOperandIdx().
|
inline |
Return the statepoint flags.
Definition at line 223 of file StackMaps.h.
References getFlagsIdx().
Referenced by hasLiveThroughUse().
|
inline |
Get index of Flags operand.
Definition at line 197 of file StackMaps.h.
References getVarIdx().
Referenced by getFlags().
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 134 of file StackMaps.cpp.
References B(), D(), getConstMetaVal(), getNumGcMapEntriesIdx(), and N.
|
inline |
Return the ID for the given statepoint.
Definition at line 205 of file StackMaps.h.
Referenced by llvm::StackMaps::recordStatepoint().
|
inline |
Get index of statepoint ID operand.
Definition at line 179 of file StackMaps.h.
|
inline |
Get index of Num Patch Bytes operand.
Definition at line 182 of file StackMaps.h.
|
inline |
Get index of Num Call Arguments operand.
Definition at line 185 of file StackMaps.h.
unsigned StatepointOpers::getNumAllocaIdx | ( | ) |
Get index of number of gc allocas.
Definition at line 103 of file StackMaps.cpp.
References getConstMetaVal(), llvm::StackMaps::getNextMetaArgIdx(), and getNumGCPtrIdx().
Referenced by getNumGcMapEntriesIdx().
|
inline |
Definition at line 225 of file StackMaps.h.
References getNumDeoptArgsIdx().
|
inline |
Get index of Number Deopt Arguments operand.
Definition at line 200 of file StackMaps.h.
References getVarIdx().
Referenced by getNumDeoptArgs(), getNumGCPtrIdx(), and hasLiveThroughUse().
unsigned StatepointOpers::getNumGcMapEntriesIdx | ( | ) |
Get index of number of gc map entries.
Definition at line 93 of file StackMaps.cpp.
References getConstMetaVal(), llvm::StackMaps::getNextMetaArgIdx(), and getNumAllocaIdx().
Referenced by getGCPointerMap().
unsigned StatepointOpers::getNumGCPtrIdx | ( | ) |
Get index of number of GC pointers.
Definition at line 113 of file StackMaps.cpp.
References getConstMetaVal(), llvm::StackMaps::getNextMetaArgIdx(), and getNumDeoptArgsIdx().
Referenced by getFirstGCPtrIdx(), getNumAllocaIdx(), and hasLiveThroughUse().
|
inline |
Return the number of patchable bytes the given statepoint should emit.
Definition at line 208 of file StackMaps.h.
Referenced by llvm::AArch64InstrInfo::getInstSizeInBytes(), llvm::LoongArchInstrInfo::getInstSizeInBytes(), llvm::RISCVInstrInfo::getInstSizeInBytes(), and llvm::LoongArchAsmPrinter::LowerSTATEPOINT().
|
inline |
Get starting index of non call related arguments (calling convention, statepoint flags, vm state and gc state).
Definition at line 189 of file StackMaps.h.
Referenced by getCCIdx(), getFlagsIdx(), getNumDeoptArgsIdx(), isFoldableReg(), and llvm::StackMaps::recordStatepoint().
|
static |
Return true if Reg is used only in operands of MI which can be folded to stack usage and MI is a statepoint instruction.
Definition at line 159 of file StackMaps.cpp.
References StatepointOpers().
Return true if Reg is used only in operands which can be folded to stack usage.
Definition at line 148 of file StackMaps.cpp.
References getVarIdx().