diff options
Diffstat (limited to 'contrib/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp')
| -rw-r--r-- | contrib/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp | 43 | 
1 files changed, 13 insertions, 30 deletions
diff --git a/contrib/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp b/contrib/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp index 630f469eabf0..f581e69980c7 100644 --- a/contrib/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp +++ b/contrib/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp @@ -7,11 +7,12 @@  //  //===----------------------------------------------------------------------===// -#include "AMDGPU.h"  #include "AMDGPUBaseInfo.h" +#include "AMDGPU.h"  #include "SIDefines.h"  #include "llvm/ADT/StringRef.h"  #include "llvm/ADT/Triple.h" +#include "llvm/BinaryFormat/ELF.h"  #include "llvm/CodeGen/MachineMemOperand.h"  #include "llvm/IR/Attributes.h"  #include "llvm/IR/Constants.h" @@ -27,7 +28,6 @@  #include "llvm/MC/MCSubtargetInfo.h"  #include "llvm/MC/SubtargetFeature.h"  #include "llvm/Support/Casting.h" -#include "llvm/Support/ELF.h"  #include "llvm/Support/ErrorHandling.h"  #include "llvm/Support/MathExtras.h"  #include <algorithm> @@ -38,7 +38,6 @@  #include "MCTargetDesc/AMDGPUMCTargetDesc.h" -  #define GET_INSTRINFO_NAMED_OPS  #include "AMDGPUGenInstrInfo.inc"  #undef GET_INSTRINFO_NAMED_OPS @@ -104,6 +103,11 @@ namespace AMDGPU {  namespace IsaInfo {  IsaVersion getIsaVersion(const FeatureBitset &Features) { +  // SI. +  if (Features.test(FeatureISAVersion6_0_0)) +    return {6, 0, 0}; +  if (Features.test(FeatureISAVersion6_0_1)) +    return {6, 0, 1};    // CI.    if (Features.test(FeatureISAVersion7_0_0))      return {7, 0, 0}; @@ -111,6 +115,8 @@ IsaVersion getIsaVersion(const FeatureBitset &Features) {      return {7, 0, 1};    if (Features.test(FeatureISAVersion7_0_2))      return {7, 0, 2}; +  if (Features.test(FeatureISAVersion7_0_3)) +    return {7, 0, 3};    // VI.    if (Features.test(FeatureISAVersion8_0_0)) @@ -131,6 +137,10 @@ IsaVersion getIsaVersion(const FeatureBitset &Features) {      return {9, 0, 0};    if (Features.test(FeatureISAVersion9_0_1))      return {9, 0, 1}; +  if (Features.test(FeatureISAVersion9_0_2)) +    return {9, 0, 2}; +  if (Features.test(FeatureISAVersion9_0_3)) +    return {9, 0, 3};    if (!Features.test(FeatureGCN) || Features.test(FeatureSouthernIslands))      return {0, 0, 0}; @@ -327,33 +337,6 @@ void initDefaultAMDKernelCodeT(amd_kernel_code_t &Header,    Header.private_segment_alignment = 4;  } -MCSection *getHSATextSection(MCContext &Ctx) { -  return Ctx.getELFSection(".hsatext", ELF::SHT_PROGBITS, -                           ELF::SHF_ALLOC | ELF::SHF_WRITE | -                           ELF::SHF_EXECINSTR | -                           ELF::SHF_AMDGPU_HSA_AGENT | -                           ELF::SHF_AMDGPU_HSA_CODE); -} - -MCSection *getHSADataGlobalAgentSection(MCContext &Ctx) { -  return Ctx.getELFSection(".hsadata_global_agent", ELF::SHT_PROGBITS, -                           ELF::SHF_ALLOC | ELF::SHF_WRITE | -                           ELF::SHF_AMDGPU_HSA_GLOBAL | -                           ELF::SHF_AMDGPU_HSA_AGENT); -} - -MCSection *getHSADataGlobalProgramSection(MCContext &Ctx) { -  return  Ctx.getELFSection(".hsadata_global_program", ELF::SHT_PROGBITS, -                            ELF::SHF_ALLOC | ELF::SHF_WRITE | -                            ELF::SHF_AMDGPU_HSA_GLOBAL); -} - -MCSection *getHSARodataReadonlyAgentSection(MCContext &Ctx) { -  return Ctx.getELFSection(".hsarodata_readonly_agent", ELF::SHT_PROGBITS, -                           ELF::SHF_ALLOC | ELF::SHF_AMDGPU_HSA_READONLY | -                           ELF::SHF_AMDGPU_HSA_AGENT); -} -  bool isGroupSegment(const GlobalValue *GV, AMDGPUAS AS) {    return GV->getType()->getAddressSpace() == AS.LOCAL_ADDRESS;  }  | 
