Matt Arsenault | 6b6a2c3 | 2016-03-11 08:00:27 +0000 | [diff] [blame] | 1 | //===-- AMDGPUMachineFunctionInfo.h -------------------------------*- C++ -*-=// |
Vincent Lejeune | ace6f73 | 2013-04-01 21:47:53 +0000 | [diff] [blame] | 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 | //===----------------------------------------------------------------------===// |
Vincent Lejeune | ace6f73 | 2013-04-01 21:47:53 +0000 | [diff] [blame] | 9 | |
Matt Arsenault | 6b6a2c3 | 2016-03-11 08:00:27 +0000 | [diff] [blame] | 10 | #ifndef LLVM_LIB_TARGET_AMDGPU_AMDGPUMACHINEFUNCTION_H |
| 11 | #define LLVM_LIB_TARGET_AMDGPU_AMDGPUMACHINEFUNCTION_H |
Vincent Lejeune | ace6f73 | 2013-04-01 21:47:53 +0000 | [diff] [blame] | 12 | |
| 13 | #include "llvm/CodeGen/MachineFunction.h" |
Tom Stellard | de60e25 | 2013-09-05 18:37:57 +0000 | [diff] [blame] | 14 | #include <map> |
Vincent Lejeune | ace6f73 | 2013-04-01 21:47:53 +0000 | [diff] [blame] | 15 | |
| 16 | namespace llvm { |
| 17 | |
| 18 | class AMDGPUMachineFunction : public MachineFunctionInfo { |
Juergen Ributzka | d12ccbd | 2013-11-19 00:57:56 +0000 | [diff] [blame] | 19 | virtual void anchor(); |
Matt Arsenault | 762af96 | 2014-07-13 03:06:39 +0000 | [diff] [blame] | 20 | |
Vincent Lejeune | ace6f73 | 2013-04-01 21:47:53 +0000 | [diff] [blame] | 21 | public: |
| 22 | AMDGPUMachineFunction(const MachineFunction &MF); |
Tom Stellard | de60e25 | 2013-09-05 18:37:57 +0000 | [diff] [blame] | 23 | /// A map to keep track of local memory objects and their offsets within |
| 24 | /// the local memory space. |
| 25 | std::map<const GlobalValue *, unsigned> LocalMemoryObjects; |
Tom Stellard | c026e8b | 2013-06-28 15:47:08 +0000 | [diff] [blame] | 26 | /// Number of bytes in the LDS that are being used. |
| 27 | unsigned LDSSize; |
Matt Arsenault | 762af96 | 2014-07-13 03:06:39 +0000 | [diff] [blame] | 28 | |
Jan Vesely | e5121f3 | 2014-10-14 20:05:26 +0000 | [diff] [blame] | 29 | /// Start of implicit kernel args |
| 30 | unsigned ABIArgOffset; |
| 31 | |
Nikolay Haustov | dc1bb79 | 2016-05-06 09:23:13 +0000 | [diff] [blame] | 32 | bool isKernel() const; |
Tom Stellard | 1e1b05d | 2015-11-06 11:45:14 +0000 | [diff] [blame] | 33 | |
Matt Arsenault | 3f98140 | 2014-09-15 15:41:53 +0000 | [diff] [blame] | 34 | unsigned ScratchSize; |
| 35 | bool IsKernel; |
Vincent Lejeune | ace6f73 | 2013-04-01 21:47:53 +0000 | [diff] [blame] | 36 | }; |
| 37 | |
Alexander Kornienko | f00654e | 2015-06-23 09:49:53 +0000 | [diff] [blame] | 38 | } |
Benjamin Kramer | a7c40ef | 2014-08-13 16:26:38 +0000 | [diff] [blame] | 39 | #endif |