LLVM  8.0.1
R600AsmPrinter.h
Go to the documentation of this file.
1 //===-- R600AsmPrinter.h - Print R600 assembly code -------------*- 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 /// \file
11 /// R600 Assembly printer class.
12 //
13 //===----------------------------------------------------------------------===//
14 
15 #ifndef LLVM_LIB_TARGET_AMDGPU_R600ASMPRINTER_H
16 #define LLVM_LIB_TARGET_AMDGPU_R600ASMPRINTER_H
17 
19 
20 namespace llvm {
21 
22 class R600AsmPrinter final : public AsmPrinter {
23 
24 public:
26  std::unique_ptr<MCStreamer> Streamer);
27  StringRef getPassName() const override;
28  bool runOnMachineFunction(MachineFunction &MF) override;
29  /// Implemented in AMDGPUMCInstLower.cpp
30  void EmitInstruction(const MachineInstr *MI) override;
31  /// Lower the specified LLVM Constant to an MCExpr.
32  /// The AsmPrinter::lowerConstantof does not know how to lower
33  /// addrspacecast, therefore they should be lowered by this function.
34  const MCExpr *lowerConstant(const Constant *CV) override;
35 
36 private:
37  void EmitProgramInfoR600(const MachineFunction &MF);
38 };
39 
40 AsmPrinter *
42  std::unique_ptr<MCStreamer> &&Streamer);
43 
44 } // namespace llvm
45 
46 #endif // LLVM_LIB_TARGET_AMDGPU_R600ASMPRINTER_H
void EmitInstruction(const MachineInstr *MI) override
Implemented in AMDGPUMCInstLower.cpp.
This class represents lattice values for constants.
Definition: AllocatorList.h:24
const MCExpr * lowerConstant(const Constant *CV) override
Lower the specified LLVM Constant to an MCExpr.
bool runOnMachineFunction(MachineFunction &MF) override
Emit the specified function out to the OutStreamer.
MachineFunction * MF
The current machine function.
Definition: AsmPrinter.h:97
AsmPrinter * createR600AsmPrinterPass(TargetMachine &TM, std::unique_ptr< MCStreamer > &&Streamer)
Base class for the full range of assembler expressions which are needed for parsing.
Definition: MCExpr.h:36
This is an important base class in LLVM.
Definition: Constant.h:42
TargetMachine & TM
Target machine description.
Definition: AsmPrinter.h:82
StringRef getPassName() const override
getPassName - Return a nice clean name for a pass.
This class is intended to be used as a driving class for all asm writers.
Definition: AsmPrinter.h:79
Representation of each machine instruction.
Definition: MachineInstr.h:64
R600AsmPrinter(TargetMachine &TM, std::unique_ptr< MCStreamer > Streamer)
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