LLVM  8.0.1
SystemZAsmPrinter.h
Go to the documentation of this file.
1 //===-- SystemZAsmPrinter.h - SystemZ LLVM assembly printer ----*- C++ -*--===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef LLVM_LIB_TARGET_SYSTEMZ_SYSTEMZASMPRINTER_H
11 #define LLVM_LIB_TARGET_SYSTEMZ_SYSTEMZASMPRINTER_H
12 
13 #include "SystemZTargetMachine.h"
14 #include "SystemZMCInstLower.h"
16 #include "llvm/CodeGen/StackMaps.h"
17 #include "llvm/Support/Compiler.h"
18 
19 namespace llvm {
20 class MCStreamer;
21 class MachineBasicBlock;
22 class MachineInstr;
23 class Module;
24 class raw_ostream;
25 
27 private:
28  StackMaps SM;
29 
30 public:
31  SystemZAsmPrinter(TargetMachine &TM, std::unique_ptr<MCStreamer> Streamer)
32  : AsmPrinter(TM, std::move(Streamer)), SM(*this) {}
33 
34  // Override AsmPrinter.
35  StringRef getPassName() const override { return "SystemZ Assembly Printer"; }
36  void EmitInstruction(const MachineInstr *MI) override;
37  void EmitMachineConstantPoolValue(MachineConstantPoolValue *MCPV) override;
38  void EmitEndOfAsmFile(Module &M) override;
39  bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo,
40  unsigned AsmVariant, const char *ExtraCode,
41  raw_ostream &OS) override;
42  bool PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo,
43  unsigned AsmVariant, const char *ExtraCode,
44  raw_ostream &OS) override;
45 
46  bool doInitialization(Module &M) override {
47  SM.reset();
49  }
50 
51 private:
52  void LowerSTACKMAP(const MachineInstr &MI);
53  void LowerPATCHPOINT(const MachineInstr &MI, SystemZMCInstLower &Lower);
54 };
55 } // end namespace llvm
56 
57 #endif
This class represents lattice values for constants.
Definition: AllocatorList.h:24
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:938
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:79
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:248
#define LLVM_LIBRARY_VISIBILITY
LLVM_LIBRARY_VISIBILITY - If a class marked with this attribute is linked into a shared library...
Definition: Compiler.h:108
This class implements an extremely fast bulk output stream that can only output to a stream...
Definition: raw_ostream.h:46
Primary interface to the complete machine description for the target machine.
Definition: TargetMachine.h:59
IRTranslator LLVM IR MI
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:49