blob: 2ef3bf5f2fb0e44a4a464e5aff5f3451dcc96a6d [file] [log] [blame]
Matt Arsenault6b6a2c32016-03-11 08:00:27 +00001//===-- AMDGPUMachineFunctionInfo.h -------------------------------*- C++ -*-=//
Vincent Lejeuneace6f732013-04-01 21:47:53 +00002//
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 Lejeuneace6f732013-04-01 21:47:53 +00009
Matt Arsenault6b6a2c32016-03-11 08:00:27 +000010#ifndef LLVM_LIB_TARGET_AMDGPU_AMDGPUMACHINEFUNCTION_H
11#define LLVM_LIB_TARGET_AMDGPU_AMDGPUMACHINEFUNCTION_H
Vincent Lejeuneace6f732013-04-01 21:47:53 +000012
13#include "llvm/CodeGen/MachineFunction.h"
Tom Stellardde60e252013-09-05 18:37:57 +000014#include <map>
Vincent Lejeuneace6f732013-04-01 21:47:53 +000015
16namespace llvm {
17
18class AMDGPUMachineFunction : public MachineFunctionInfo {
Juergen Ributzkad12ccbd2013-11-19 00:57:56 +000019 virtual void anchor();
Matt Arsenault762af962014-07-13 03:06:39 +000020
Vincent Lejeuneace6f732013-04-01 21:47:53 +000021public:
22 AMDGPUMachineFunction(const MachineFunction &MF);
Tom Stellardde60e252013-09-05 18:37:57 +000023 /// 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 Stellardc026e8b2013-06-28 15:47:08 +000026 /// Number of bytes in the LDS that are being used.
27 unsigned LDSSize;
Matt Arsenault762af962014-07-13 03:06:39 +000028
Jan Veselye5121f32014-10-14 20:05:26 +000029 /// Start of implicit kernel args
30 unsigned ABIArgOffset;
31
Nikolay Haustov6eb050e2016-05-06 14:59:04 +000032 bool isKernel() const {
33 // FIXME: Assume everything is a kernel until function calls are supported.
34 return true;
35 }
Tom Stellard1e1b05d2015-11-06 11:45:14 +000036
Matt Arsenault3f981402014-09-15 15:41:53 +000037 unsigned ScratchSize;
38 bool IsKernel;
Vincent Lejeuneace6f732013-04-01 21:47:53 +000039};
40
Alexander Kornienkof00654e2015-06-23 09:49:53 +000041}
Benjamin Kramera7c40ef2014-08-13 16:26:38 +000042#endif