LLVM 19.0.0git
PseudoProbePrinter.h
Go to the documentation of this file.
1//===- PseudoProbePrinter.h - Pseudo probe encoding support -----*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file contains support for writing pseudo probe info into asm files.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_LIB_CODEGEN_ASMPRINTER_PSEUDOPROBEPRINTER_H
14#define LLVM_LIB_CODEGEN_ASMPRINTER_PSEUDOPROBEPRINTER_H
15
16#include "llvm/ADT/DenseMap.h"
18
19namespace llvm {
20
21class AsmPrinter;
22class DILocation;
23
25 // Target of pseudo probe emission.
26 AsmPrinter *Asm;
27 // Name to GUID map, used as caching/memoization for speed.
29
30public:
33
35 uint64_t Attr, const DILocation *DebugLoc);
36
37 // Unused.
38 void setSymbolSize(const MCSymbol *Sym, uint64_t Size) override {}
39 void endModule() override {}
40 void beginFunction(const MachineFunction *MF) override {}
41 void endFunction(const MachineFunction *MF) override {}
42 void beginInstruction(const MachineInstr *MI) override {}
43 void endInstruction() override {}
44};
45
46} // namespace llvm
47#endif // LLVM_LIB_CODEGEN_ASMPRINTER_PSEUDOPROBEPRINTER_H
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
This file defines the DenseMap class.
uint64_t Size
Symbol * Sym
Definition: ELF_riscv.cpp:479
IRTranslator LLVM IR MI
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.
Definition: AsmPrinter.h:84
Debug location.
A debug info location.
Definition: DebugLoc.h:33
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Definition: MCSymbol.h:40
Representation of each machine instruction.
Definition: MachineInstr.h:69
void endInstruction() override
Process end of an instruction.
~PseudoProbeHandler() override
void beginFunction(const MachineFunction *MF) override
Gather pre-function debug information.
PseudoProbeHandler(AsmPrinter *A)
void endFunction(const MachineFunction *MF) override
Gather post-function debug information.
void emitPseudoProbe(uint64_t Guid, uint64_t Index, uint64_t Type, uint64_t Attr, const DILocation *DebugLoc)
void endModule() override
Emit all sections that should come after the content.
void beginInstruction(const MachineInstr *MI) override
Process beginning of an instruction.
void setSymbolSize(const MCSymbol *Sym, uint64_t Size) override
For symbols that have a size designated (e.g.
The instances of the Type class are immutable: once they are created, they are never changed.
Definition: Type.h:45
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18