Vincent Lejeune | ace6f73 | 2013-04-01 21:47:53 +0000 | [diff] [blame] | 1 | //===-- R600MachineFunctionInfo.h - R600 Machine Function Info ----*- 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 | //===----------------------------------------------------------------------===// |
| 12 | |
Benjamin Kramer | a7c40ef | 2014-08-13 16:26:38 +0000 | [diff] [blame^] | 13 | #ifndef LLVM_LIB_TARGET_R600_AMDGPUMACHINEFUNCTION_H |
| 14 | #define LLVM_LIB_TARGET_R600_AMDGPUMACHINEFUNCTION_H |
Vincent Lejeune | ace6f73 | 2013-04-01 21:47:53 +0000 | [diff] [blame] | 15 | |
| 16 | #include "llvm/CodeGen/MachineFunction.h" |
Tom Stellard | de60e25 | 2013-09-05 18:37:57 +0000 | [diff] [blame] | 17 | #include <map> |
Vincent Lejeune | ace6f73 | 2013-04-01 21:47:53 +0000 | [diff] [blame] | 18 | |
| 19 | namespace llvm { |
| 20 | |
| 21 | class AMDGPUMachineFunction : public MachineFunctionInfo { |
Juergen Ributzka | d12ccbd | 2013-11-19 00:57:56 +0000 | [diff] [blame] | 22 | virtual void anchor(); |
Matt Arsenault | 762af96 | 2014-07-13 03:06:39 +0000 | [diff] [blame] | 23 | unsigned ShaderType; |
| 24 | |
Vincent Lejeune | ace6f73 | 2013-04-01 21:47:53 +0000 | [diff] [blame] | 25 | public: |
| 26 | AMDGPUMachineFunction(const MachineFunction &MF); |
Tom Stellard | de60e25 | 2013-09-05 18:37:57 +0000 | [diff] [blame] | 27 | /// A map to keep track of local memory objects and their offsets within |
| 28 | /// the local memory space. |
| 29 | std::map<const GlobalValue *, unsigned> LocalMemoryObjects; |
Tom Stellard | c026e8b | 2013-06-28 15:47:08 +0000 | [diff] [blame] | 30 | /// Number of bytes in the LDS that are being used. |
| 31 | unsigned LDSSize; |
Matt Arsenault | 762af96 | 2014-07-13 03:06:39 +0000 | [diff] [blame] | 32 | |
| 33 | unsigned getShaderType() const { |
| 34 | return ShaderType; |
| 35 | } |
Vincent Lejeune | ace6f73 | 2013-04-01 21:47:53 +0000 | [diff] [blame] | 36 | }; |
| 37 | |
| 38 | } |
Benjamin Kramer | a7c40ef | 2014-08-13 16:26:38 +0000 | [diff] [blame^] | 39 | #endif |