Tom Stellard | 75aadc2 | 2012-12-11 21:25:42 +0000 | [diff] [blame^] | 1 | //===-- AMDGPUAsmPrinter.h - Print AMDGPU assembly code -------------------===// |
| 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 | /// \brief AMDGPU Assembly printer class. |
| 12 | // |
| 13 | //===----------------------------------------------------------------------===// |
| 14 | |
| 15 | #ifndef AMDGPU_ASMPRINTER_H |
| 16 | #define AMDGPU_ASMPRINTER_H |
| 17 | |
| 18 | #include "llvm/CodeGen/AsmPrinter.h" |
| 19 | |
| 20 | namespace llvm { |
| 21 | |
| 22 | class AMDGPUAsmPrinter : public AsmPrinter { |
| 23 | |
| 24 | public: |
| 25 | explicit AMDGPUAsmPrinter(TargetMachine &TM, MCStreamer &Streamer) |
| 26 | : AsmPrinter(TM, Streamer) { } |
| 27 | |
| 28 | virtual bool runOnMachineFunction(MachineFunction &MF); |
| 29 | |
| 30 | virtual const char *getPassName() const { |
| 31 | return "AMDGPU Assembly Printer"; |
| 32 | } |
| 33 | |
| 34 | /// \brief Emit register usage information so that the GPU driver |
| 35 | /// can correctly setup the GPU state. |
| 36 | void EmitProgramInfo(MachineFunction &MF); |
| 37 | |
| 38 | /// Implemented in AMDGPUMCInstLower.cpp |
| 39 | virtual void EmitInstruction(const MachineInstr *MI); |
| 40 | }; |
| 41 | |
| 42 | } // End anonymous llvm |
| 43 | |
| 44 | #endif //AMDGPU_ASMPRINTER_H |