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 MCExpr;
23class MCStreamer;
24class MachineInstr;
25class Module;
26class raw_ostream;
27
29 SystemZTargetStreamer *getTargetStreamer() {
30 MCTargetStreamer *TS = OutStreamer->getTargetStreamer();
31 assert(TS && "do not have a target streamer");
32 return static_cast<SystemZTargetStreamer *>(TS);
33 }
34
35public:
36 static char ID;
37
38 SystemZAsmPrinter(TargetMachine &TM, std::unique_ptr<MCStreamer> Streamer)
40
41 // Override AsmPrinter.
42 StringRef getPassName() const override { return "SystemZ Assembly Printer"; }
43 void emitInstruction(const MachineInstr *MI) override;
44 bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo,
45 const char *ExtraCode, raw_ostream &OS) override;
46 bool PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo,
47 const char *ExtraCode, raw_ostream &OS) override;
48
51
52 // Emit the XRay table for this function.
54
55 return false;
56 }
57};
58} // end namespace llvm
59
60#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:94
void emitXRayTable()
Emit a table with all XRay instrumentation points.
MachineFunction * MF
The current machine function.
Definition AsmPrinter.h:109
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:453
std::unique_ptr< MCStreamer > OutStreamer
This is the MCStreamer object for the file we are generating.
Definition AsmPrinter.h:106
Base class for the full range of assembler expressions which are needed for parsing.
Definition MCExpr.h:34
Streaming machine code generation interface.
Definition MCStreamer.h:222
Target specific streamer interface.
Definition MCStreamer.h:95
Representation of each machine instruction.
A Module instance is used to store all the information related to an LLVM module.
Definition Module.h:68
Represent a constant reference to a string, i.e.
Definition StringRef.h:56
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.
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:1917
Implement std::hash so that hash_code can be used in STL containers.
Definition BitVector.h:878