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 21 public: 22 AMDGPUMachineFunction(const MachineFunction &MF); 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; 26 /// Number of bytes in the LDS that are being used. 27 unsigned LDSSize; 28 29 /// Start of implicit kernel args 30 unsigned ABIArgOffset; 31 32 bool isKernel() const { 33 // FIXME: Assume everything is a kernel until function calls are supported. 34 return true; 35 } 36 37 unsigned ScratchSize; 38 bool IsKernel; 39 }; 40 41 } 42 #endif 43