class StackMaps

Declaration

class StackMaps { /* full declaration omitted */ };

Declared at: llvm/include/llvm/CodeGen/StackMaps.h:251

Member Variables

private llvm::AsmPrinter& AP
private llvm::StackMaps::CallsiteInfoList CSInfos
private llvm::StackMaps::ConstantPool ConstPool
private llvm::StackMaps::FnInfoMap FnInfos
private static const char* WSMP

Method Overview

  • public StackMaps(llvm::AsmPrinter & AP)
  • private llvm::StackMaps::LiveOutReg createLiveOutReg(unsigned int Reg, const llvm::TargetRegisterInfo * TRI) const
  • private void debug()
  • private void emitCallsiteEntries(llvm::MCStreamer & OS)
  • private void emitConstantPoolEntries(llvm::MCStreamer & OS)
  • private void emitFunctionFrameRecords(llvm::MCStreamer & OS)
  • private void emitStackmapHeader(llvm::MCStreamer & OS)
  • public llvm::StackMaps::CallsiteInfoList & getCSInfos()
  • public llvm::StackMaps::FnInfoMap & getFnInfos()
  • public static unsigned int getNextMetaArgIdx(const llvm::MachineInstr * MI, unsigned int CurIdx)
  • private MachineInstr::const_mop_iterator parseOperand(MachineInstr::const_mop_iterator MOI, MachineInstr::const_mop_iterator MOE, llvm::StackMaps::LocationVec & Locs, llvm::StackMaps::LiveOutVec & LiveOuts) const
  • private llvm::StackMaps::LiveOutVec parseRegisterLiveOutMask(const uint32_t * Mask) const
  • private void parseStatepointOpers(const llvm::MachineInstr & MI, MachineInstr::const_mop_iterator MOI, MachineInstr::const_mop_iterator MOE, llvm::StackMaps::LocationVec & Locations, llvm::StackMaps::LiveOutVec & LiveOuts)
  • private void print(llvm::raw_ostream & OS)
  • public void recordPatchPoint(const llvm::MCSymbol & L, const llvm::MachineInstr & MI)
  • public void recordStackMap(const llvm::MCSymbol & L, const llvm::MachineInstr & MI)
  • private void recordStackMapOpers(const llvm::MCSymbol & L, const llvm::MachineInstr & MI, uint64_t ID, MachineInstr::const_mop_iterator MOI, MachineInstr::const_mop_iterator MOE, bool recordResult = false)
  • public void recordStatepoint(const llvm::MCSymbol & L, const llvm::MachineInstr & MI)
  • public void reset()
  • public void serializeToStackMapSection()

Methods

StackMaps(llvm::AsmPrinter& AP)

Declared at: llvm/include/llvm/CodeGen/StackMaps.h:288

Parameters

llvm::AsmPrinter& AP

llvm::StackMaps::LiveOutReg createLiveOutReg(
    unsigned int Reg,
    const llvm::TargetRegisterInfo* TRI) const

Description

Create a live-out register record for the given register @p Reg.

Declared at: llvm/include/llvm/CodeGen/StackMaps.h:374

Parameters

unsigned int Reg
const llvm::TargetRegisterInfo* TRI

void debug()

Declared at: llvm/include/llvm/CodeGen/StackMaps.h:407

void emitCallsiteEntries(llvm::MCStreamer& OS)

Description

Emit the callsite info for each stackmap/patchpoint intrinsic call.

Declared at: llvm/include/llvm/CodeGen/StackMaps.h:404

Parameters

llvm::MCStreamer& OS

void emitConstantPoolEntries(llvm::MCStreamer& OS)

Description

Emit the constant pool.

Declared at: llvm/include/llvm/CodeGen/StackMaps.h:401

Parameters

llvm::MCStreamer& OS

void emitFunctionFrameRecords(
    llvm::MCStreamer& OS)

Description

Emit the function frame record for each function.

Declared at: llvm/include/llvm/CodeGen/StackMaps.h:398

Parameters

llvm::MCStreamer& OS

void emitStackmapHeader(llvm::MCStreamer& OS)

Description

Emit the stackmap header.

Declared at: llvm/include/llvm/CodeGen/StackMaps.h:395

Parameters

llvm::MCStreamer& OS

llvm::StackMaps::CallsiteInfoList& getCSInfos()

Description

Get call site info.

Declared at: llvm/include/llvm/CodeGen/StackMaps.h:348

llvm::StackMaps::FnInfoMap& getFnInfos()

Description

Get function info.

Declared at: llvm/include/llvm/CodeGen/StackMaps.h:351

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

Description

Get index of next meta operand. Similar to parseOperand, but does not actually parses operand meaning.

Declared at: llvm/include/llvm/CodeGen/StackMaps.h:292

Parameters

const llvm::MachineInstr* MI
unsigned int CurIdx

MachineInstr::const_mop_iterator parseOperand(
    MachineInstr::const_mop_iterator MOI,
    MachineInstr::const_mop_iterator MOE,
    llvm::StackMaps::LocationVec& Locs,
    llvm::StackMaps::LiveOutVec& LiveOuts) const

Declared at: llvm/include/llvm/CodeGen/StackMaps.h:362

Parameters

MachineInstr::const_mop_iterator MOI
MachineInstr::const_mop_iterator MOE
llvm::StackMaps::LocationVec& Locs
llvm::StackMaps::LiveOutVec& LiveOuts

llvm::StackMaps::LiveOutVec
parseRegisterLiveOutMask(
    const uint32_t* Mask) const

Description

Parse the register live-out mask and return a vector of live-out registers that need to be recorded in the stackmap.

Declared at: llvm/include/llvm/CodeGen/StackMaps.h:379

Parameters

const uint32_t* Mask

void parseStatepointOpers(
    const llvm::MachineInstr& MI,
    MachineInstr::const_mop_iterator MOI,
    MachineInstr::const_mop_iterator MOE,
    llvm::StackMaps::LocationVec& Locations,
    llvm::StackMaps::LiveOutVec& LiveOuts)

Description

Specialized parser of statepoint operands. They do not directly correspond to StackMap record entries.

Declared at: llvm/include/llvm/CodeGen/StackMaps.h:368

Parameters

const llvm::MachineInstr& MI
MachineInstr::const_mop_iterator MOI
MachineInstr::const_mop_iterator MOE
llvm::StackMaps::LocationVec& Locations
llvm::StackMaps::LiveOutVec& LiveOuts

void print(llvm::raw_ostream& OS)

Declared at: llvm/include/llvm/CodeGen/StackMaps.h:406

Parameters

llvm::raw_ostream& OS

void recordPatchPoint(
    const llvm::MCSymbol& L,
    const llvm::MachineInstr& MI)

Description

Generate a stackmap record for a patchpoint instruction.

Declared at: llvm/include/llvm/CodeGen/StackMaps.h:335

Parameters

const llvm::MCSymbol& L
const llvm::MachineInstr& MI

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

Description

Generate a stackmap record for a stackmap instruction. MI must be a raw STACKMAP, not a PATCHPOINT.

Declared at: llvm/include/llvm/CodeGen/StackMaps.h:331

Parameters

const llvm::MCSymbol& L
const llvm::MachineInstr& MI

void recordStackMapOpers(
    const llvm::MCSymbol& L,
    const llvm::MachineInstr& MI,
    uint64_t ID,
    MachineInstr::const_mop_iterator MOI,
    MachineInstr::const_mop_iterator MOE,
    bool recordResult = false)

Description

Record the locations of the operands of the provided instruction in a record keyed by the provided label. For instructions w/AnyReg calling convention the return register is also recorded if requested. For STACKMAP, and PATCHPOINT the label is expected to immediately *preceed* lowering of the MI to MCInsts. For STATEPOINT, it expected to immediately *follow*. It's not clear this difference was intentional, but it exists today.

Declared at: llvm/include/llvm/CodeGen/StackMaps.h:388

Parameters

const llvm::MCSymbol& L
const llvm::MachineInstr& MI
uint64_t ID
MachineInstr::const_mop_iterator MOI
MachineInstr::const_mop_iterator MOE
bool recordResult = false

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

Description

Generate a stackmap record for a statepoint instruction.

Declared at: llvm/include/llvm/CodeGen/StackMaps.h:339

Parameters

const llvm::MCSymbol& L
const llvm::MachineInstr& MI

void reset()

Declared at: llvm/include/llvm/CodeGen/StackMaps.h:294

void serializeToStackMapSection()

Description

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

Declared at: llvm/include/llvm/CodeGen/StackMaps.h:345