LLVM  12.0.0git
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  const char *ExtraCode, raw_ostream &OS) override;
40  bool PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo,
41  const char *ExtraCode, raw_ostream &OS) override;
43  bool doInitialization(Module &M) override {
44  SM.reset();
46  }
48 private:
49  void LowerFENTRY_CALL(const MachineInstr &MI, SystemZMCInstLower &MCIL);
50  void LowerSTACKMAP(const MachineInstr &MI);
51  void LowerPATCHPOINT(const MachineInstr &MI, SystemZMCInstLower &Lower);
52 };
53 } // end namespace llvm
55 #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:67
Machine Debugify Module
SystemZAsmPrinter(TargetMachine &TM, std::unique_ptr< MCStreamer > Streamer)
Definition: BitVector.h:959
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:81
LLVM_LIBRARY_VISIBILITY - If a class marked with this attribute is linked into a shared library...
Definition: Compiler.h:130
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:62
bool doInitialization(Module &M) override
Set up the AsmPrinter when we are working on a new module.
Definition: AsmPrinter.cpp:251
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:65
IRTranslator LLVM IR MI
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:57