LLVM 24.0.0git
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
13#include "SystemZMCInstLower.h"
20
21namespace llvm {
22class MCStreamer;
23class MachineInstr;
24class Module;
25class raw_ostream;
26
28 SystemZTargetStreamer *getTargetStreamer() {
29 MCTargetStreamer *TS = OutStreamer->getTargetStreamer();
30 assert(TS && "do not have a target streamer");
31 return static_cast<SystemZTargetStreamer *>(TS);
32 }
33
34public:
35 static char ID;
36
37 SystemZAsmPrinter(TargetMachine &TM, std::unique_ptr<MCStreamer> Streamer)
39
40 // Override AsmPrinter.
41 StringRef getPassName() const override { return "SystemZ Assembly Printer"; }
42 void emitInstruction(const MachineInstr *MI) override;
43 bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo,
44 const char *ExtraCode, raw_ostream &OS) override;
45 bool PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo,
46 const char *ExtraCode, raw_ostream &OS) override;
47
50
51 // Emit the XRay table for this function.
53
54 return false;
55 }
56};
57
59 : public RequiredPassInfoMixin<SystemZAsmPrinterBeginPass> {
60public:
62};
63
65 : public RequiredPassInfoMixin<SystemZAsmPrinterPass> {
66public:
69};
70
72 : public RequiredPassInfoMixin<SystemZAsmPrinterEndPass> {
73public:
75};
76
77} // end namespace llvm
78
79#endif
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
#define LLVM_LIBRARY_VISIBILITY
Definition Compiler.h:137
IRTranslator LLVM IR MI
std::unique_ptr< MCStreamer > && Streamer
TargetMachine & TM
Target machine description.
Definition AsmPrinter.h:96
void emitXRayTable()
Emit a table with all XRay instrumentation points.
MachineFunction * MF
The current machine function.
Definition AsmPrinter.h:111
AsmPrinter(TargetMachine &TM, std::unique_ptr< MCStreamer > Streamer, char &ID=AsmPrinter::ID)
bool runOnMachineFunction(MachineFunction &MF) override
Emit the specified function out to the OutStreamer.
Definition AsmPrinter.h:478
std::unique_ptr< MCStreamer > OutStreamer
This is the MCStreamer object for the file we are generating.
Definition AsmPrinter.h:108
Streaming machine code generation interface.
Definition MCStreamer.h:221
Target specific streamer interface.
Definition MCStreamer.h:94
Representation of each machine instruction.
A Module instance is used to store all the information related to an LLVM module.
Definition Module.h:68
A set of analyses that are preserved following a run of a transformation pass.
Definition Analysis.h:112
Represent a constant reference to a string, i.e.
Definition StringRef.h:56
PreservedAnalyses run(Module &M, ModuleAnalysisManager &MFAM)
PreservedAnalyses run(Module &M, ModuleAnalysisManager &MFAM)
PreservedAnalyses run(MachineFunction &MF, MachineFunctionAnalysisManager &MFAM)
StringRef getPassName() const override
getPassName - Return a nice clean name for a pass.
bool runOnMachineFunction(MachineFunction &MF) override
Emit the specified function out to the OutStreamer.
SystemZAsmPrinter(TargetMachine &TM, std::unique_ptr< MCStreamer > Streamer)
Primary interface to the complete machine description for the target machine.
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition raw_ostream.h:53
This is an optimization pass for GlobalISel generic memory operations.
AnalysisManager< MachineFunction > MachineFunctionAnalysisManager
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
Definition STLExtras.h:1933
AnalysisManager< Module > ModuleAnalysisManager
Convenience typedef for the Module analysis manager.
Definition MIRParser.h:39
Implement std::hash so that hash_code can be used in STL containers.
Definition BitVector.h:879
A CRTP mix-in for passes that should not be skipped.