LLVM  8.0.1
Public Member Functions | Protected Member Functions | List of all members
llvm::BTFDebug Class Reference

Collect and emit BTF information. More...

#include "Target/BPF/BTFDebug.h"

Inheritance diagram for llvm::BTFDebug:
Inheritance graph
[legend]
Collaboration diagram for llvm::BTFDebug:
Collaboration graph
[legend]

Public Member Functions

 BTFDebug (AsmPrinter *AP)
 
uint32_t getArrayIndexTypeId ()
 Get the special array index type id. More...
 
size_t addString (StringRef S)
 Add string to the string table. More...
 
uint32_t getTypeId (const DIType *Ty)
 Get the type id for a particular DIType. More...
 
void setSymbolSize (const MCSymbol *Symbol, uint64_t Size) override
 For symbols that have a size designated (e.g. More...
 
void beginInstruction (const MachineInstr *MI) override
 Process beginning of an instruction. More...
 
void endModule () override
 Complete all the types and emit the BTF sections. More...
 
- Public Member Functions inherited from llvm::DebugHandlerBase
void endInstruction () override
 Process end of an instruction. More...
 
void beginFunction (const MachineFunction *MF) override
 Gather pre-function debug information. More...
 
void endFunction (const MachineFunction *MF) override
 Gather post-function debug information. More...
 
MCSymbolgetLabelBeforeInsn (const MachineInstr *MI)
 Return Label preceding the instruction. More...
 
MCSymbolgetLabelAfterInsn (const MachineInstr *MI)
 Return Label immediately following the instruction. More...
 
const MCExprgetFunctionLocalOffsetAfterInsn (const MachineInstr *MI)
 Return the function-local offset of an instruction. More...
 
- Public Member Functions inherited from llvm::AsmPrinterHandler
virtual ~AsmPrinterHandler ()
 Pin vtable to this file. More...
 
virtual void markFunctionEnd ()
 
virtual void beginFragment (const MachineBasicBlock *MBB, ExceptionSymbolProvider ESP)
 
virtual void endFragment ()
 
virtual void beginFunclet (const MachineBasicBlock &MBB, MCSymbol *Sym=nullptr)
 Emit target-specific EH funclet machinery. More...
 
virtual void endFunclet ()
 

Protected Member Functions

void beginFunctionImpl (const MachineFunction *MF) override
 Gather pre-function debug information. More...
 
void endFunctionImpl (const MachineFunction *MF) override
 Post process after all instructions in this function are processed. More...
 
- Protected Member Functions inherited from llvm::DebugHandlerBase
 DebugHandlerBase (AsmPrinter *A)
 
void identifyScopeMarkers ()
 Indentify instructions that are marking the beginning of or ending of a scope. More...
 
void requestLabelBeforeInsn (const MachineInstr *MI)
 Ensure that a label will be emitted before MI. More...
 
void requestLabelAfterInsn (const MachineInstr *MI)
 Ensure that a label will be emitted after MI. More...
 
virtual void skippedNonDebugFunction ()
 

Additional Inherited Members

- Static Public Member Functions inherited from llvm::DebugHandlerBase
static uint64_t getBaseTypeSize (const DITypeRef TyRef)
 If this type is derived from a base type then return base type size. More...
 
- Protected Attributes inherited from llvm::DebugHandlerBase
AsmPrinterAsm
 Target of debug info emission. More...
 
MachineModuleInfoMMI
 Collected machine module information. More...
 
DebugLoc PrevInstLoc
 Previous instruction's location information. More...
 
MCSymbolPrevLabel = nullptr
 
const MachineBasicBlockPrevInstBB = nullptr
 
DebugLoc PrologEndLoc
 This location indicates end of function prologue and beginning of function body. More...
 
const MachineInstrCurMI = nullptr
 If nonnull, stores the current machine instruction we're processing. More...
 
LexicalScopes LScopes
 
DbgValueHistoryMap DbgValues
 History of DBG_VALUE and clobber instructions for each user variable. More...
 
DbgLabelInstrMap DbgLabels
 Mapping of inlined labels and DBG_LABEL machine instruction. More...
 
DenseMap< const MachineInstr *, MCSymbol * > LabelsBeforeInsn
 Maps instruction with label emitted before instruction. More...
 
DenseMap< const MachineInstr *, MCSymbol * > LabelsAfterInsn
 Maps instruction with label emitted after instruction. More...
 

Detailed Description

Collect and emit BTF information.

Definition at line 193 of file BTFDebug.h.

Constructor & Destructor Documentation

◆ BTFDebug()

BTFDebug::BTFDebug ( AsmPrinter AP)

Member Function Documentation

◆ addString()

size_t llvm::BTFDebug::addString ( StringRef  S)
inline

◆ beginFunctionImpl()

void BTFDebug::beginFunctionImpl ( const MachineFunction MF)
overrideprotectedvirtual

◆ beginInstruction()

void BTFDebug::beginInstruction ( const MachineInstr MI)
overridevirtual

◆ endFunctionImpl()

void BTFDebug::endFunctionImpl ( const MachineFunction MF)
overrideprotectedvirtual

Post process after all instructions in this function are processed.

Implements llvm::DebugHandlerBase.

Definition at line 688 of file BTFDebug.cpp.

◆ endModule()

void BTFDebug::endModule ( )
overridevirtual

◆ getArrayIndexTypeId()

uint32_t llvm::BTFDebug::getArrayIndexTypeId ( )
inline

Get the special array index type id.

Definition at line 258 of file BTFDebug.h.

References assert().

Referenced by llvm::BTFTypeArray::completeType().

◆ getTypeId()

uint32_t llvm::BTFDebug::getTypeId ( const DIType Ty)
inline

◆ setSymbolSize()

void llvm::BTFDebug::setSymbolSize ( const MCSymbol Sym,
uint64_t  Size 
)
inlineoverridevirtual

For symbols that have a size designated (e.g.

common symbols), this tracks that size.

Implements llvm::AsmPrinterHandler.

Definition at line 274 of file BTFDebug.h.

References MI.


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