LLVM 20.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 |
unsigned | getNumGcMapEntriesIdx () |
Get index of number of gc map entries. | |
unsigned | getNumAllocaIdx () |
Get index of number of gc allocas. | |
unsigned | getNumGCPtrIdx () |
Get index of number of GC pointers. | |
int | getFirstGCPtrIdx () |
Get index of first GC pointer operand of -1 if there are none. | |
unsigned | getGCPointerMap (SmallVectorImpl< std::pair< unsigned, unsigned > > &GCMap) |
Get vector of base/derived pairs from statepoint. | |
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 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 158 of file StackMaps.h.
|
inlineexplicit |
Definition at line 173 of file StackMaps.h.
References MI.
|
inline |
Return the calling convention.
Definition at line 217 of file StackMaps.h.
References getCCIdx(), and MI.
|
inline |
Return the target of the underlying call.
Definition at line 212 of file StackMaps.h.
References MI.
Referenced by llvm::LoongArchAsmPrinter::LowerSTATEPOINT().
|
inline |
Get index of Calling Convention operand.
Definition at line 193 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 222 of file StackMaps.h.
References getFlagsIdx(), and MI.
Referenced by hasLiveThroughUse().
|
inline |
Get index of Flags operand.
Definition at line 196 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(), llvm::MachineOperand::getImm(), getNumGcMapEntriesIdx(), llvm::MachineInstr::getOperand(), and N.
|
inline |
Return the ID for the given statepoint.
Definition at line 204 of file StackMaps.h.
References MI.
Referenced by llvm::StackMaps::recordStatepoint().
|
inline |
Get index of statepoint ID operand.
Definition at line 178 of file StackMaps.h.
|
inline |
Get index of Num Patch Bytes operand.
Definition at line 181 of file StackMaps.h.
|
inline |
Get index of Num Call Arguments operand.
Definition at line 184 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 224 of file StackMaps.h.
References getNumDeoptArgsIdx(), and MI.
|
inline |
Get index of Number Deopt Arguments operand.
Definition at line 199 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 207 of file StackMaps.h.
References MI.
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 188 of file StackMaps.h.
References MI.
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 isFoldableReg(), and MI.
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(), and llvm::MachineInstr::uses().
Referenced by isFoldableReg().