LLVM
13.0.0git
|
#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 | |
StackMaps (AsmPrinter &AP) | |
void | reset () |
void | recordStackMap (const MCSymbol &L, const MachineInstr &MI) |
Generate a stackmap record for a stackmap instruction. More... | |
void | recordPatchPoint (const MCSymbol &L, const MachineInstr &MI) |
Generate a stackmap record for a patchpoint instruction. More... | |
void | recordStatepoint (const MCSymbol &L, const MachineInstr &MI) |
Generate a stackmap record for a statepoint instruction. More... | |
void | serializeToStackMapSection () |
If there is any stack map data, create a stack map section and serialize the map info into it. More... | |
CallsiteInfoList & | getCSInfos () |
Get call site info. More... | |
FnInfoMap & | getFnInfos () |
Get function info. More... | |
Static Public Member Functions | |
static unsigned | getNextMetaArgIdx (const MachineInstr *MI, unsigned CurIdx) |
Get index of next meta operand. More... | |
Definition at line 251 of file StackMaps.h.
Definition at line 326 of file StackMaps.h.
using llvm::StackMaps::ConstantPool = MapVector<uint64_t, uint64_t> |
Definition at line 302 of file StackMaps.h.
using llvm::StackMaps::FnInfoMap = MapVector<const MCSymbol *, FunctionInfo> |
Definition at line 325 of file StackMaps.h.
using llvm::StackMaps::LiveOutVec = SmallVector<LiveOutReg, 8> |
Definition at line 301 of file StackMaps.h.
using llvm::StackMaps::LocationVec = SmallVector<Location, 8> |
Definition at line 300 of file StackMaps.h.
using llvm::StackMaps::OpType = enum { DirectMemRefOp, IndirectMemRefOp, ConstantOp } |
Definition at line 286 of file StackMaps.h.
StackMaps::StackMaps | ( | AsmPrinter & | AP | ) |
Definition at line 149 of file StackMaps.cpp.
References llvm_unreachable, and StackMapVersion.
|
inline |
Get call site info.
Definition at line 348 of file StackMaps.h.
|
inline |
Get function info.
Definition at line 351 of file StackMaps.h.
|
static |
Get index of next meta operand.
Similar to parseOperand, but does not actually parses operand meaning.
Definition at line 154 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().
void StackMaps::recordPatchPoint | ( | const MCSymbol & | L, |
const MachineInstr & | MI | ||
) |
Generate a stackmap record for a patchpoint instruction.
Definition at line 534 of file StackMaps.cpp.
References assert(), llvm::numbers::e, llvm::PatchPointOpers::getID(), llvm::PatchPointOpers::getNumCallArgs(), llvm::PatchPointOpers::getStackMapStartIdx(), llvm::PatchPointOpers::hasDef(), i, llvm::PatchPointOpers::isAnyReg(), MI, and llvm::StackMaps::Location::Register.
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 524 of file StackMaps.cpp.
References assert(), llvm::StackMapOpers::getVarIdx(), llvm::PatchPointOpers::IDPos, and MI.
void StackMaps::recordStatepoint | ( | const MCSymbol & | L, |
const MachineInstr & | MI | ||
) |
Generate a stackmap record for a statepoint instruction.
Definition at line 555 of file StackMaps.cpp.
References assert(), llvm::StatepointOpers::getID(), llvm::StatepointOpers::getVarIdx(), and MI.
|
inline |
Definition at line 294 of file StackMaps.h.
References llvm::MapVector< KeyT, ValueT, MapType, VectorType >::clear().
Referenced by llvm::SystemZAsmPrinter::doInitialization(), and llvm::X86AsmPrinter::doInitialization().
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 708 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, llvm::AsmPrinter::OutStreamer, and llvm::MCStreamer::SwitchSection().
Referenced by llvm::AsmPrinter::emitStackMaps().