1 //===-- R600AsmPrinter.h - Print R600 assembly code -------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
11 /// R600 Assembly printer class.
13 //===----------------------------------------------------------------------===//
15 #ifndef LLVM_LIB_TARGET_AMDGPU_R600ASMPRINTER_H
16 #define LLVM_LIB_TARGET_AMDGPU_R600ASMPRINTER_H
18 #include "llvm/CodeGen/AsmPrinter.h"
22 class R600AsmPrinter final : public AsmPrinter {
25 explicit R600AsmPrinter(TargetMachine &TM,
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;
37 void EmitProgramInfoR600(const MachineFunction &MF);
41 createR600AsmPrinterPass(TargetMachine &TM,
42 std::unique_ptr<MCStreamer> &&Streamer);
46 #endif // LLVM_LIB_TARGET_AMDGPU_R600ASMPRINTER_H