1 //===-- AMDGPUAsmPrinter.h - Print AMDGPU 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 /// \brief AMDGPU Assembly printer class.
13 //===----------------------------------------------------------------------===//
15 #ifndef AMDGPU_ASMPRINTER_H
16 #define AMDGPU_ASMPRINTER_H
18 #include "llvm/CodeGen/AsmPrinter.h"
24 class AMDGPUAsmPrinter : public AsmPrinter {
27 explicit AMDGPUAsmPrinter(TargetMachine &TM, MCStreamer &Streamer);
29 virtual bool runOnMachineFunction(MachineFunction &MF);
31 virtual const char *getPassName() const {
32 return "AMDGPU Assembly Printer";
35 /// \brief Emit register usage information so that the GPU driver
36 /// can correctly setup the GPU state.
37 void EmitProgramInfoR600(MachineFunction &MF);
38 void EmitProgramInfoSI(MachineFunction &MF);
40 /// Implemented in AMDGPUMCInstLower.cpp
41 virtual void EmitInstruction(const MachineInstr *MI);
45 std::vector<std::string> DisasmLines, HexLines;
46 size_t DisasmLineMaxLen;
49 } // End anonymous llvm
51 #endif //AMDGPU_ASMPRINTER_H