LLVM: include/llvm/CodeGen/DebugHandlerBase.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13

14#ifndef LLVM_CODEGEN_DEBUGHANDLERBASE_H

15#define LLVM_CODEGEN_DEBUGHANDLERBASE_H

16

22#include

23

24namespace llvm {

25

26class AsmPrinter;

27class MachineInstr;

28class MachineModuleInfo;

29

30

32

34

35

36

38

39

40 std::optionalllvm::DIExpression::FragmentInfo FragmentInfo;

41

42

43

44

45

46

47 static std::optional

49};

50

51

52

54protected:

56

57

59

60

62

63

64

65

66

70

71

72

74

75

77

78

80

82

83

84

86

87

89

90

91

92

94

95

97

98

99

101

102

105 }

106

107

110 }

111

115

116private:

118

119

120public:

122

124

127

130

133

134

136

137

139

140

142

143

145

147};

148

149}

150

151#endif

static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")

Collects and handles AsmPrinter objects required to build debug or EH information.

This class is intended to be used as a driving class for all asm writers.

For each inlined instance of a source-level label, keep the corresponding DBG_LABEL instruction.

For each user variable, keep a list of instruction ranges where this variable is accessible.

Base class for debug information backends.

static bool isUnsignedDIType(const DIType *Ty)

Return true if type encoding is unsigned.

const MachineInstr * CurMI

If nonnull, stores the current machine instruction we're processing.

AsmPrinter * Asm

Target of debug info emission.

virtual void endFunctionImpl(const MachineFunction *MF)=0

MCSymbol * getLabelBeforeInsn(const MachineInstr *MI)

Return Label preceding the instruction.

MachineModuleInfo * MMI

Collected machine module information.

void endBasicBlockSection(const MachineBasicBlock &MBB) override

Process the end of a basic-block-section within a function.

void identifyScopeMarkers()

Indentify instructions that are marking the beginning of or ending of a scope.

virtual void skippedNonDebugFunction()

void endFunction(const MachineFunction *MF) override

Gather post-function debug information.

DebugLoc PrevInstLoc

Previous instruction's location information.

void beginFunction(const MachineFunction *MF) override

Gather pre-function debug information.

void endInstruction() override

Process end of an instruction.

virtual ~DebugHandlerBase() override

MCSymbol * getLabelAfterInsn(const MachineInstr *MI)

Return Label immediately following the instruction.

void beginInstruction(const MachineInstr *MI) override

Process beginning of an instruction.

const MachineBasicBlock * PrevInstBB

virtual void beginFunctionImpl(const MachineFunction *MF)=0

void requestLabelAfterInsn(const MachineInstr *MI)

Ensure that a label will be emitted after MI.

void beginBasicBlockSection(const MachineBasicBlock &MBB) override

Process the beginning of a new basic-block-section within a function.

DbgValueHistoryMap DbgValues

History of DBG_VALUE and clobber instructions for each user variable.

DbgLabelInstrMap DbgLabels

Mapping of inlined labels and DBG_LABEL machine instruction.

DenseMap< const MachineInstr *, MCSymbol * > LabelsBeforeInsn

Maps instruction with label emitted before instruction.

void beginModule(Module *M) override

const InstructionOrdering & getInstOrdering() const

DenseMap< const MachineInstr *, MCSymbol * > LabelsAfterInsn

Maps instruction with label emitted after instruction.

void requestLabelBeforeInsn(const MachineInstr *MI)

Ensure that a label will be emitted before MI.

const MachineBasicBlock * EpilogBeginBlock

This block includes epilogue instructions.

const MachineInstr * PrologEndLoc

This location indicates end of function prologue and beginning of function body.

static uint64_t getBaseTypeSize(const DIType *Ty)

If this type is derived from a base type then return base type size.

Record instruction ordering so we can query their relative positions within a function.

LexicalScopes - This class provides interface to collect and use lexical scoping information from mac...

MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...

Representation of each machine instruction.

This class contains meta information specific to a module.

A Module instance is used to store all the information related to an LLVM module.

This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.

This is an optimization pass for GlobalISel generic memory operations.

Represents the location at which a variable is stored.

std::optional< llvm::DIExpression::FragmentInfo > FragmentInfo

Present if the location is part of a larger variable.

unsigned Register

Base register.

static std::optional< DbgVariableLocation > extractFromMachineInstruction(const MachineInstr &Instruction)

Extract a VariableLocation from a MachineInstr.

SmallVector< int64_t, 1 > LoadChain

Chain of offsetted loads necessary to load the value if it lives in memory.