LLVM API Documentation

AMDGPUMachineFunction.h
Go to the documentation of this file.
00001 //===-- R600MachineFunctionInfo.h - R600 Machine Function Info ----*- C++ -*-=//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file is distributed under the University of Illinois Open Source
00006 // License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 //
00010 /// \file
00011 //===----------------------------------------------------------------------===//
00012 
00013 #ifndef LLVM_LIB_TARGET_R600_AMDGPUMACHINEFUNCTION_H
00014 #define LLVM_LIB_TARGET_R600_AMDGPUMACHINEFUNCTION_H
00015 
00016 #include "llvm/CodeGen/MachineFunction.h"
00017 #include <map>
00018 
00019 namespace llvm {
00020 
00021 class AMDGPUMachineFunction : public MachineFunctionInfo {
00022   virtual void anchor();
00023   unsigned ShaderType;
00024 
00025 public:
00026   AMDGPUMachineFunction(const MachineFunction &MF);
00027   /// A map to keep track of local memory objects and their offsets within
00028   /// the local memory space.
00029   std::map<const GlobalValue *, unsigned> LocalMemoryObjects;
00030   /// Number of bytes in the LDS that are being used.
00031   unsigned LDSSize;
00032 
00033   unsigned getShaderType() const {
00034     return ShaderType;
00035   }
00036 
00037   unsigned ScratchSize;
00038   bool IsKernel;
00039 };
00040 
00041 }
00042 #endif