LLVM  9.0.0svn
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 //===----------------------------------------------------------------------===//
12 #include "SystemZTargetMachine.h"
13 #include "SystemZMCInstLower.h"
15 #include "llvm/CodeGen/StackMaps.h"
16 #include "llvm/Support/Compiler.h"
18 namespace llvm {
19 class MCStreamer;
20 class MachineBasicBlock;
21 class MachineInstr;
22 class Module;
23 class raw_ostream;
26 private:
27  StackMaps SM;
29 public:
30  SystemZAsmPrinter(TargetMachine &TM, std::unique_ptr<MCStreamer> Streamer)
31  : AsmPrinter(TM, std::move(Streamer)), SM(*this) {}
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  unsigned AsmVariant, const char *ExtraCode,
40  raw_ostream &OS) override;
41  bool PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo,
42  unsigned AsmVariant, const char *ExtraCode,
43  raw_ostream &OS) override;
45  bool doInitialization(Module &M) override {
46  SM.reset();
48  }
50 private:
51  void LowerSTACKMAP(const MachineInstr &MI);
52  void LowerPATCHPOINT(const MachineInstr &MI, SystemZMCInstLower &Lower);
53 };
54 } // end namespace llvm
56 #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:64
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
LLVM_LIBRARY_VISIBILITY - If a class marked with this attribute is linked into a shared library...
Definition: Compiler.h:107
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:63
bool doInitialization(Module &M) override
Set up the AsmPrinter when we are working on a new module.
Definition: AsmPrinter.cpp:247
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:58
IRTranslator LLVM IR MI
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:48