LLVM  13.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 
19 namespace llvm {
20 
21 class AsmPrinter;
22 class MCStreamer;
23 class Module;
24 class DILocation;
25 
27  // Target of pseudo probe emission.
28  AsmPrinter *Asm;
29  // Name to GUID map
31 
32 public:
34  ~PseudoProbeHandler() override;
35 
36  void emitPseudoProbe(uint64_t Guid, uint64_t Index, uint64_t Type,
37  uint64_t Attr, const DILocation *DebugLoc);
38 
39  // Unused.
40  void setSymbolSize(const MCSymbol *Sym, uint64_t Size) override {}
41  void endModule() override {}
42  void beginFunction(const MachineFunction *MF) override {}
43  void endFunction(const MachineFunction *MF) override {}
44  void beginInstruction(const MachineInstr *MI) override {}
45  void endInstruction() override {}
46 
47 #ifndef NDEBUG
48  void dump() const;
49 #endif
50 };
51 
52 } // namespace llvm
53 #endif // LLVM_LIB_CODEGEN_ASMPRINTER_PSEUDOPROBEPRINTER_H
llvm::Check::Size
@ Size
Definition: FileCheck.h:73
llvm::PseudoProbeHandler::endFunction
void endFunction(const MachineFunction *MF) override
Gather post-function debug information.
Definition: PseudoProbePrinter.h:43
MI
IRTranslator LLVM IR MI
Definition: IRTranslator.cpp:102
llvm
Definition: AllocatorList.h:23
llvm::MCSymbol
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Definition: MCSymbol.h:41
M
We currently emits eax Perhaps this is what we really should generate is Is imull three or four cycles eax eax The current instruction priority is based on pattern complexity The former is more complex because it folds a load so the latter will not be emitted Perhaps we should use AddedComplexity to give LEA32r a higher priority We should always try to match LEA first since the LEA matching code does some estimate to determine whether the match is profitable if we care more about code then imull is better It s two bytes shorter than movl leal On a Pentium M
Definition: README.txt:252
llvm::DILocation
Debug location.
Definition: DebugInfoMetadata.h:1562
llvm::Type
The instances of the Type class are immutable: once they are created, they are never changed.
Definition: Type.h:46
DenseMap.h
AsmPrinterHandler.h
llvm::PseudoProbeHandler::beginFunction
void beginFunction(const MachineFunction *MF) override
Gather pre-function debug information.
Definition: PseudoProbePrinter.h:42
llvm::PseudoProbeHandler::endModule
void endModule() override
Emit all sections that should come after the content.
Definition: PseudoProbePrinter.h:41
llvm::PseudoProbeHandler
Definition: PseudoProbePrinter.h:26
llvm::PseudoProbeHandler::~PseudoProbeHandler
~PseudoProbeHandler() override
Index
uint32_t Index
Definition: ELFObjHandler.cpp:84
llvm::MachineInstr
Representation of each machine instruction.
Definition: MachineInstr.h:64
llvm::DenseMap
Definition: DenseMap.h:714
llvm::Module
A Module instance is used to store all the information related to an LLVM module.
Definition: Module.h:67
llvm::PseudoProbeHandler::dump
void dump() const
Definition: PseudoProbePrinter.cpp:77
llvm::MachineFunction
Definition: MachineFunction.h:230
Module
Machine Check Debug Module
Definition: MachineCheckDebugify.cpp:122
llvm::PseudoProbeHandler::beginInstruction
void beginInstruction(const MachineInstr *MI) override
Process beginning of an instruction.
Definition: PseudoProbePrinter.h:44
llvm::AsmPrinter
This class is intended to be used as a driving class for all asm writers.
Definition: AsmPrinter.h:82
llvm::AsmPrinterHandler
Collects and handles AsmPrinter objects required to build debug or EH information.
Definition: AsmPrinterHandler.h:33
llvm::PseudoProbeHandler::emitPseudoProbe
void emitPseudoProbe(uint64_t Guid, uint64_t Index, uint64_t Type, uint64_t Attr, const DILocation *DebugLoc)
Definition: PseudoProbePrinter.cpp:48
llvm::PseudoProbeHandler::endInstruction
void endInstruction() override
Process end of an instruction.
Definition: PseudoProbePrinter.h:45
llvm::PseudoProbeHandler::setSymbolSize
void setSymbolSize(const MCSymbol *Sym, uint64_t Size) override
For symbols that have a size designated (e.g.
Definition: PseudoProbePrinter.h:40
llvm::DebugLoc
A debug info location.
Definition: DebugLoc.h:33
llvm::PseudoProbeHandler::PseudoProbeHandler
PseudoProbeHandler(AsmPrinter *A, Module *M)
Definition: PseudoProbePrinter.cpp:27