1 //===-- AMDGPUBaseInfo.h - Top level definitions for AMDGPU -----*- 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 #ifndef LLVM_LIB_TARGET_AMDGPU_UTILS_AMDGPUBASEINFO_H
11 #define LLVM_LIB_TARGET_AMDGPU_UTILS_AMDGPUBASEINFO_H
12 
13 #include "AMDKernelCodeT.h"
14 
15 namespace llvm {
16 
17 class FeatureBitset;
18 class GlobalValue;
19 class MCContext;
20 class MCSection;
21 
22 namespace AMDGPU {
23 
24 struct IsaVersion {
25   unsigned Major;
26   unsigned Minor;
27   unsigned Stepping;
28 };
29 
30 IsaVersion getIsaVersion(const FeatureBitset &Features);
31 void initDefaultAMDKernelCodeT(amd_kernel_code_t &Header,
32                                const FeatureBitset &Features);
33 MCSection *getHSATextSection(MCContext &Ctx);
34 
35 MCSection *getHSADataGlobalAgentSection(MCContext &Ctx);
36 
37 MCSection *getHSADataGlobalProgramSection(MCContext &Ctx);
38 
39 MCSection *getHSARodataReadonlyAgentSection(MCContext &Ctx);
40 
41 bool isGroupSegment(const GlobalValue *GV);
42 bool isGlobalSegment(const GlobalValue *GV);
43 bool isReadOnlySegment(const GlobalValue *GV);
44 
45 } // end namespace AMDGPU
46 } // end namespace llvm
47 
48 #endif
49