blob: e4ed73cd0689c4e8a84fb98c1b11baef85a28fe7 [file] [log] [blame]
Tom Stellard347ac792015-06-26 21:15:07 +00001//===-- 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
15namespace llvm {
16
17class FeatureBitset;
Tom Stellardac00eb52015-12-15 16:26:16 +000018class Function;
Tom Stellarde3b5aea2015-12-02 17:00:42 +000019class GlobalValue;
Tom Stellarde135ffd2015-09-25 21:41:28 +000020class MCContext;
21class MCSection;
Tom Stellard347ac792015-06-26 21:15:07 +000022
23namespace AMDGPU {
24
25struct IsaVersion {
26 unsigned Major;
27 unsigned Minor;
28 unsigned Stepping;
29};
30
31IsaVersion getIsaVersion(const FeatureBitset &Features);
Tom Stellardff7416b2015-06-26 21:58:31 +000032void initDefaultAMDKernelCodeT(amd_kernel_code_t &Header,
33 const FeatureBitset &Features);
Tom Stellarde135ffd2015-09-25 21:41:28 +000034MCSection *getHSATextSection(MCContext &Ctx);
Tom Stellard347ac792015-06-26 21:15:07 +000035
Tom Stellard00f2f912015-12-02 19:47:57 +000036MCSection *getHSADataGlobalAgentSection(MCContext &Ctx);
37
38MCSection *getHSADataGlobalProgramSection(MCContext &Ctx);
39
Tom Stellard9760f032015-12-03 03:34:32 +000040MCSection *getHSARodataReadonlyAgentSection(MCContext &Ctx);
41
Tom Stellarde3b5aea2015-12-02 17:00:42 +000042bool isGroupSegment(const GlobalValue *GV);
Tom Stellard00f2f912015-12-02 19:47:57 +000043bool isGlobalSegment(const GlobalValue *GV);
44bool isReadOnlySegment(const GlobalValue *GV);
Tom Stellarde3b5aea2015-12-02 17:00:42 +000045
Tom Stellardac00eb52015-12-15 16:26:16 +000046unsigned getShaderType(const Function &F);
47
Tom Stellard347ac792015-06-26 21:15:07 +000048} // end namespace AMDGPU
49} // end namespace llvm
50
51#endif