LLVM  10.0.0svn
SystemZAsmPrinter.h
Go to the documentation of this file.
1 //===-- SystemZAsmPrinter.h - SystemZ LLVM assembly printer ----*- 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 #ifndef LLVM_LIB_TARGET_SYSTEMZ_SYSTEMZASMPRINTER_H
10 #define LLVM_LIB_TARGET_SYSTEMZ_SYSTEMZASMPRINTER_H
11 
12 #include "SystemZTargetMachine.h"
13 #include "SystemZMCInstLower.h"
15 #include "llvm/CodeGen/StackMaps.h"
16 #include "llvm/Support/Compiler.h"
17 
18 namespace llvm {
19 class MCStreamer;
20 class MachineBasicBlock;
21 class MachineInstr;
22 class Module;
23 class raw_ostream;
24 
26 private:
27  StackMaps SM;
28 
29 public:
30  SystemZAsmPrinter(TargetMachine &TM, std::unique_ptr<MCStreamer> Streamer)
31  : AsmPrinter(TM, std::move(Streamer)), SM(*this) {}
32 
33  // Override AsmPrinter.
34  StringRef getPassName() const override { return "SystemZ Assembly Printer"; }
35  void EmitInstruction(const MachineInstr *MI) override;
36  void EmitMachineConstantPoolValue(MachineConstantPoolValue *MCPV) override;
37  void EmitEndOfAsmFile(Module &M) override;
38  bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo,
39  const char *ExtraCode, raw_ostream &OS) override;
40  bool PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo,
41  const char *ExtraCode, raw_ostream &OS) override;
42 
43  bool doInitialization(Module &M) override {
44  SM.reset();
46  }
47 
48 private:
49  void LowerSTACKMAP(const MachineInstr &MI);
50  void LowerPATCHPOINT(const MachineInstr &MI, SystemZMCInstLower &Lower);
51 };
52 } // end namespace llvm
53 
54 #endif
This class represents lattice values for constants.
Definition: AllocatorList.h:23
A Module instance is used to store all the information related to an LLVM module. ...
Definition: Module.h:65
SystemZAsmPrinter(TargetMachine &TM, std::unique_ptr< MCStreamer > Streamer)
Definition: BitVector.h:937
bool doInitialization(Module &M) override
Set up the AsmPrinter when we are working on a new module.
This class is intended to be used as a driving class for all asm writers.
Definition: AsmPrinter.h:78
#define LLVM_LIBRARY_VISIBILITY
LLVM_LIBRARY_VISIBILITY - If a class marked with this attribute is linked into a shared library...
Definition: Compiler.h:115
Abstract base class for all machine specific constantpool value subclasses.
StringRef getPassName() const override
getPassName - Return a nice clean name for a pass.
Representation of each machine instruction.
Definition: MachineInstr.h:64
bool doInitialization(Module &M) override
Set up the AsmPrinter when we are working on a new module.
Definition: AsmPrinter.cpp:256
This class implements an extremely fast bulk output stream that can only output to a stream...
Definition: raw_ostream.h:45
Primary interface to the complete machine description for the target machine.
Definition: TargetMachine.h:65
IRTranslator LLVM IR MI
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:48