1f4a2713aSLionel Sambuc //===-- R600MachineFunctionInfo.h - R600 Machine Function Info ----*- C++ -*-=// 2f4a2713aSLionel Sambuc // 3f4a2713aSLionel Sambuc // The LLVM Compiler Infrastructure 4f4a2713aSLionel Sambuc // 5f4a2713aSLionel Sambuc // This file is distributed under the University of Illinois Open Source 6f4a2713aSLionel Sambuc // License. See LICENSE.TXT for details. 7f4a2713aSLionel Sambuc // 8f4a2713aSLionel Sambuc //===----------------------------------------------------------------------===// 9f4a2713aSLionel Sambuc // 10f4a2713aSLionel Sambuc /// \file 11f4a2713aSLionel Sambuc //===----------------------------------------------------------------------===// 12f4a2713aSLionel Sambuc 13*0a6a1f1dSLionel Sambuc #ifndef LLVM_LIB_TARGET_R600_AMDGPUMACHINEFUNCTION_H 14*0a6a1f1dSLionel Sambuc #define LLVM_LIB_TARGET_R600_AMDGPUMACHINEFUNCTION_H 15f4a2713aSLionel Sambuc 16f4a2713aSLionel Sambuc #include "llvm/CodeGen/MachineFunction.h" 17f4a2713aSLionel Sambuc #include <map> 18f4a2713aSLionel Sambuc 19f4a2713aSLionel Sambuc namespace llvm { 20f4a2713aSLionel Sambuc 21f4a2713aSLionel Sambuc class AMDGPUMachineFunction : public MachineFunctionInfo { 22f4a2713aSLionel Sambuc virtual void anchor(); 23*0a6a1f1dSLionel Sambuc unsigned ShaderType; 24*0a6a1f1dSLionel Sambuc 25f4a2713aSLionel Sambuc public: 26f4a2713aSLionel Sambuc AMDGPUMachineFunction(const MachineFunction &MF); 27f4a2713aSLionel Sambuc /// A map to keep track of local memory objects and their offsets within 28f4a2713aSLionel Sambuc /// the local memory space. 29f4a2713aSLionel Sambuc std::map<const GlobalValue *, unsigned> LocalMemoryObjects; 30f4a2713aSLionel Sambuc /// Number of bytes in the LDS that are being used. 31f4a2713aSLionel Sambuc unsigned LDSSize; 32*0a6a1f1dSLionel Sambuc 33*0a6a1f1dSLionel Sambuc /// Start of implicit kernel args 34*0a6a1f1dSLionel Sambuc unsigned ABIArgOffset; 35*0a6a1f1dSLionel Sambuc getShaderType()36*0a6a1f1dSLionel Sambuc unsigned getShaderType() const { 37*0a6a1f1dSLionel Sambuc return ShaderType; 38*0a6a1f1dSLionel Sambuc } 39*0a6a1f1dSLionel Sambuc 40*0a6a1f1dSLionel Sambuc unsigned ScratchSize; 41*0a6a1f1dSLionel Sambuc bool IsKernel; 42f4a2713aSLionel Sambuc }; 43f4a2713aSLionel Sambuc 44f4a2713aSLionel Sambuc } 45*0a6a1f1dSLionel Sambuc #endif 46