blob: f5e4694e76f6ff854473751305d954bd71f8b428 [file] [log] [blame]
Vincent Lejeuneace6f732013-04-01 21:47:53 +00001//===-- 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 Kramera7c40ef2014-08-13 16:26:38 +000013#ifndef LLVM_LIB_TARGET_R600_AMDGPUMACHINEFUNCTION_H
14#define LLVM_LIB_TARGET_R600_AMDGPUMACHINEFUNCTION_H
Vincent Lejeuneace6f732013-04-01 21:47:53 +000015
16#include "llvm/CodeGen/MachineFunction.h"
Tom Stellardde60e252013-09-05 18:37:57 +000017#include <map>
Vincent Lejeuneace6f732013-04-01 21:47:53 +000018
19namespace llvm {
20
21class AMDGPUMachineFunction : public MachineFunctionInfo {
Juergen Ributzkad12ccbd2013-11-19 00:57:56 +000022 virtual void anchor();
Matt Arsenault762af962014-07-13 03:06:39 +000023 unsigned ShaderType;
24
Vincent Lejeuneace6f732013-04-01 21:47:53 +000025public:
26 AMDGPUMachineFunction(const MachineFunction &MF);
Tom Stellardde60e252013-09-05 18:37:57 +000027 /// 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 Stellardc026e8b2013-06-28 15:47:08 +000030 /// Number of bytes in the LDS that are being used.
31 unsigned LDSSize;
Matt Arsenault762af962014-07-13 03:06:39 +000032
Jan Veselye5121f32014-10-14 20:05:26 +000033 /// Start of implicit kernel args
34 unsigned ABIArgOffset;
35
Matt Arsenault762af962014-07-13 03:06:39 +000036 unsigned getShaderType() const {
37 return ShaderType;
38 }
Matt Arsenault3f981402014-09-15 15:41:53 +000039
40 unsigned ScratchSize;
41 bool IsKernel;
Vincent Lejeuneace6f732013-04-01 21:47:53 +000042};
43
44}
Benjamin Kramera7c40ef2014-08-13 16:26:38 +000045#endif