LLVM 22.0.0git
llvm::StackMaps Class Reference

#include "llvm/CodeGen/StackMaps.h"

Classes

struct  CallsiteInfo
struct  FunctionInfo
struct  LiveOutReg
struct  Location

Public Types

using OpType = enum { DirectMemRefOp, IndirectMemRefOp, ConstantOp }
using LocationVec = SmallVector<Location, 8>
using LiveOutVec = SmallVector<LiveOutReg, 8>
using ConstantPool = MapVector<uint64_t, uint64_t>
using FnInfoMap = MapVector<const MCSymbol *, FunctionInfo>
using CallsiteInfoList = std::vector<CallsiteInfo>

Public Member Functions

LLVM_ABI StackMaps (AsmPrinter &AP)
void reset ()
LLVM_ABI void recordStackMap (const MCSymbol &L, const MachineInstr &MI)
 Generate a stackmap record for a stackmap instruction.
LLVM_ABI void recordPatchPoint (const MCSymbol &L, const MachineInstr &MI)
 Generate a stackmap record for a patchpoint instruction.
LLVM_ABI void recordStatepoint (const MCSymbol &L, const MachineInstr &MI)
 Generate a stackmap record for a statepoint instruction.
LLVM_ABI void serializeToStackMapSection ()
 If there is any stack map data, create a stack map section and serialize the map info into it.
CallsiteInfoListgetCSInfos ()
 Get call site info.
FnInfoMapgetFnInfos ()
 Get function info.

Static Public Member Functions

static LLVM_ABI unsigned getNextMetaArgIdx (const MachineInstr *MI, unsigned CurIdx)
 Get index of next meta operand.

Detailed Description

Definition at line 260 of file StackMaps.h.

Member Typedef Documentation

◆ CallsiteInfoList

Definition at line 335 of file StackMaps.h.

◆ ConstantPool

◆ FnInfoMap

◆ LiveOutVec

Definition at line 310 of file StackMaps.h.

◆ LocationVec

Definition at line 309 of file StackMaps.h.

◆ OpType

using llvm::StackMaps::OpType = enum { DirectMemRefOp, IndirectMemRefOp, ConstantOp }

Definition at line 294 of file StackMaps.h.

Constructor & Destructor Documentation

◆ StackMaps()

StackMaps::StackMaps ( AsmPrinter & AP)

Definition at line 165 of file StackMaps.cpp.

References llvm_unreachable, and StackMapVersion.

Member Function Documentation

◆ getCSInfos()

CallsiteInfoList & llvm::StackMaps::getCSInfos ( )
inline

Get call site info.

Definition at line 354 of file StackMaps.h.

◆ getFnInfos()

FnInfoMap & llvm::StackMaps::getFnInfos ( )
inline

Get function info.

Definition at line 357 of file StackMaps.h.

◆ getNextMetaArgIdx()

unsigned StackMaps::getNextMetaArgIdx ( const MachineInstr * MI,
unsigned CurIdx )
static

Get index of next meta operand.

Similar to parseOperand, but does not actually parses operand meaning.

Definition at line 170 of file StackMaps.cpp.

References assert(), llvm_unreachable, and MI.

Referenced by llvm::MachineInstr::findTiedOperandIdx(), llvm::StatepointOpers::getNumAllocaIdx(), llvm::StatepointOpers::getNumGcMapEntriesIdx(), and llvm::StatepointOpers::getNumGCPtrIdx().

◆ recordPatchPoint()

◆ recordStackMap()

void StackMaps::recordStackMap ( const MCSymbol & L,
const MachineInstr & MI )

Generate a stackmap record for a stackmap instruction.

MI must be a raw STACKMAP, not a PATCHPOINT.

Definition at line 529 of file StackMaps.cpp.

References assert(), llvm::StackMapOpers::getVarIdx(), llvm::PatchPointOpers::IDPos, and MI.

◆ recordStatepoint()

void StackMaps::recordStatepoint ( const MCSymbol & L,
const MachineInstr & MI )

Generate a stackmap record for a statepoint instruction.

Definition at line 560 of file StackMaps.cpp.

References assert(), llvm::StatepointOpers::getID(), llvm::StatepointOpers::getVarIdx(), and MI.

◆ reset()

void llvm::StackMaps::reset ( )
inline

Definition at line 303 of file StackMaps.h.

◆ serializeToStackMapSection()

void StackMaps::serializeToStackMapSection ( )

If there is any stack map data, create a stack map section and serialize the map info into it.

Serialize the stackmap data.

This clears the stack map data structures afterwards.

Definition at line 713 of file StackMaps.cpp.

References llvm::MCStreamer::addBlankLine(), assert(), llvm::dbgs(), llvm::MCStreamer::emitLabel(), llvm::MCContext::getObjectFileInfo(), llvm::MCContext::getOrCreateSymbol(), llvm::MCObjectFileInfo::getStackMapSection(), LLVM_DEBUG, and llvm::MCStreamer::switchSection().


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