1 //===-- AMDGPUMachineFunctionInfo.h -------------------------------*- 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 #ifndef LLVM_LIB_TARGET_AMDGPU_AMDGPUMACHINEFUNCTION_H 11 #define LLVM_LIB_TARGET_AMDGPU_AMDGPUMACHINEFUNCTION_H 12 13 #include "llvm/CodeGen/MachineFunction.h" 14 #include <map> 15 16 namespace llvm { 17 18 class AMDGPUMachineFunction : public MachineFunctionInfo { 19 virtual void anchor(); 20 unsigned ShaderType; 21 22 public: 23 AMDGPUMachineFunction(const MachineFunction &MF); 24 /// A map to keep track of local memory objects and their offsets within 25 /// the local memory space. 26 std::map<const GlobalValue *, unsigned> LocalMemoryObjects; 27 /// Number of bytes in the LDS that are being used. 28 unsigned LDSSize; 29 30 /// Start of implicit kernel args 31 unsigned ABIArgOffset; 32 33 unsigned getShaderType() const { 34 return ShaderType; 35 } 36 37 bool isKernel() const { 38 // FIXME: Assume everything is a kernel until function calls are supported. 39 return true; 40 } 41 42 unsigned ScratchSize; 43 bool IsKernel; 44 }; 45 46 } 47 #endif 48