1 //===-- AMDGPUBaseInfo.h - Top level definitions for AMDGPU -----*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLVM_LIB_TARGET_AMDGPU_UTILS_AMDGPUBASEINFO_H
11 #define LLVM_LIB_TARGET_AMDGPU_UTILS_AMDGPUBASEINFO_H
13 #include "AMDKernelCodeT.h"
22 class MCSubtargetInfo;
32 IsaVersion getIsaVersion(const FeatureBitset &Features);
33 void initDefaultAMDKernelCodeT(amd_kernel_code_t &Header,
34 const FeatureBitset &Features);
35 MCSection *getHSATextSection(MCContext &Ctx);
37 MCSection *getHSADataGlobalAgentSection(MCContext &Ctx);
39 MCSection *getHSADataGlobalProgramSection(MCContext &Ctx);
41 MCSection *getHSARodataReadonlyAgentSection(MCContext &Ctx);
43 bool isGroupSegment(const GlobalValue *GV);
44 bool isGlobalSegment(const GlobalValue *GV);
45 bool isReadOnlySegment(const GlobalValue *GV);
47 unsigned getShaderType(const Function &F);
49 bool isSI(const MCSubtargetInfo &STI);
50 bool isCI(const MCSubtargetInfo &STI);
51 bool isVI(const MCSubtargetInfo &STI);
53 /// If \p Reg is a pseudo reg, return the correct hardware register given
54 /// \p STI otherwise return \p Reg.
55 unsigned getMCReg(unsigned Reg, const MCSubtargetInfo &STI);
57 } // end namespace AMDGPU
58 } // end namespace llvm