[RISCV] Fix mgather -> riscv.masked.strided.load combine not extending indices (...
[llvm-project.git] / llvm / lib / CodeGen / AsmPrinter / PseudoProbePrinter.h
bloba92a89084cadb49068b286e43bb80bce34c89111
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.
11 //===----------------------------------------------------------------------===//
13 #ifndef LLVM_LIB_CODEGEN_ASMPRINTER_PSEUDOPROBEPRINTER_H
14 #define LLVM_LIB_CODEGEN_ASMPRINTER_PSEUDOPROBEPRINTER_H
16 #include "llvm/ADT/DenseMap.h"
17 #include "llvm/CodeGen/AsmPrinterHandler.h"
19 namespace llvm {
21 class AsmPrinter;
22 class DILocation;
24 class PseudoProbeHandler : public AsmPrinterHandler {
25 // Target of pseudo probe emission.
26 AsmPrinter *Asm;
27 // Name to GUID map, used as caching/memoization for speed.
28 DenseMap<StringRef, uint64_t> NameGuidMap;
30 public:
31 PseudoProbeHandler(AsmPrinter *A) : Asm(A){};
32 ~PseudoProbeHandler() override;
34 void emitPseudoProbe(uint64_t Guid, uint64_t Index, uint64_t Type,
35 uint64_t Attr, const DILocation *DebugLoc);
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 {}
46 } // namespace llvm
47 #endif // LLVM_LIB_CODEGEN_ASMPRINTER_PSEUDOPROBEPRINTER_H