[PATCH] D33689: AMDGPU: Remove deprecated and unused elf definitions

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Tue May 30 16:42:51 PDT 2017


Fine by me if someone from AMD verifies that they are not needed
anymore.

Konstantin Zhuravlyov via Phabricator via llvm-commits
<llvm-commits at lists.llvm.org> writes:

> kzhuravl created this revision.
> Herald added subscribers: tpr, dstuttard, yaxunl, nhaehnle, wdng.
>
> https://reviews.llvm.org/D33689
>
> Files:
>   include/llvm/Support/ELF.h
>   lib/ObjectYAML/ELFYAML.cpp
>   lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
>   lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp
>   lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.h
>   lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
>   lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h
>   test/Object/AMDGPU/elf-definitions.yaml
>   test/tools/llvm-readobj/Inputs/trivial.elf-amdhsa-kaveri
>   test/tools/llvm-readobj/Inputs/trivial.obj.elf-amdhsa-gfx803
>   test/tools/llvm-readobj/amdgpu-elf-definitions.test
>   test/tools/llvm-readobj/amdgpu-elf-defs.test
>   test/tools/llvm-readobj/elf-sec-flags.test
>   tools/llvm-readobj/ELFDumper.cpp
>
> Index: tools/llvm-readobj/ELFDumper.cpp
> ===================================================================
> --- tools/llvm-readobj/ELFDumper.cpp
> +++ tools/llvm-readobj/ELFDumper.cpp
> @@ -978,9 +978,7 @@
>      {"GNU_IFunc", "IFUNC",   ELF::STT_GNU_IFUNC}};
>  
>  static const EnumEntry<unsigned> AMDGPUSymbolTypes[] = {
> -  { "AMDGPU_HSA_KERNEL",            ELF::STT_AMDGPU_HSA_KERNEL },
> -  { "AMDGPU_HSA_INDIRECT_FUNCTION", ELF::STT_AMDGPU_HSA_INDIRECT_FUNCTION },
> -  { "AMDGPU_HSA_METADATA",          ELF::STT_AMDGPU_HSA_METADATA }
> +  { "AMDGPU_HSA_KERNEL",            ELF::STT_AMDGPU_HSA_KERNEL }
>  };
>  
>  static const char *getGroupType(uint32_t Flag) {
> @@ -1012,13 +1010,6 @@
>    LLVM_READOBJ_ENUM_ENT(ELF, XCORE_SHF_DP_SECTION)
>  };
>  
> -static const EnumEntry<unsigned> ElfAMDGPUSectionFlags[] = {
> -  LLVM_READOBJ_ENUM_ENT(ELF, SHF_AMDGPU_HSA_GLOBAL),
> -  LLVM_READOBJ_ENUM_ENT(ELF, SHF_AMDGPU_HSA_READONLY),
> -  LLVM_READOBJ_ENUM_ENT(ELF, SHF_AMDGPU_HSA_CODE),
> -  LLVM_READOBJ_ENUM_ENT(ELF, SHF_AMDGPU_HSA_AGENT)
> -};
> -
>  static const EnumEntry<unsigned> ElfARMSectionFlags[] = {
>    LLVM_READOBJ_ENUM_ENT(ELF, SHF_ARM_PURECODE)
>  };
> @@ -1077,13 +1068,6 @@
>    // Check potentially overlapped processor-specific
>    // program header type.
>    switch (Arch) {
> -  case ELF::EM_AMDGPU:
> -    switch (Type) {
> -    LLVM_READOBJ_ENUM_CASE(ELF, PT_AMDGPU_HSA_LOAD_GLOBAL_PROGRAM);
> -    LLVM_READOBJ_ENUM_CASE(ELF, PT_AMDGPU_HSA_LOAD_GLOBAL_AGENT);
> -    LLVM_READOBJ_ENUM_CASE(ELF, PT_AMDGPU_HSA_LOAD_READONLY_AGENT);
> -    LLVM_READOBJ_ENUM_CASE(ELF, PT_AMDGPU_HSA_LOAD_CODE_AGENT);
> -    }
>    case ELF::EM_ARM:
>      switch (Type) {
>      LLVM_READOBJ_ENUM_CASE(ELF, PT_ARM_EXIDX);
> @@ -1139,14 +1123,6 @@
>    default:
>      // All machine specific PT_* types
>      switch (Arch) {
> -    case ELF::EM_AMDGPU:
> -      switch (Type) {
> -        LLVM_READOBJ_ENUM_CASE(ELF, PT_AMDGPU_HSA_LOAD_GLOBAL_PROGRAM);
> -        LLVM_READOBJ_ENUM_CASE(ELF, PT_AMDGPU_HSA_LOAD_GLOBAL_AGENT);
> -        LLVM_READOBJ_ENUM_CASE(ELF, PT_AMDGPU_HSA_LOAD_READONLY_AGENT);
> -        LLVM_READOBJ_ENUM_CASE(ELF, PT_AMDGPU_HSA_LOAD_CODE_AGENT);
> -      }
> -      return "";
>      case ELF::EM_ARM:
>        if (Type == ELF::PT_ARM_EXIDX)
>          return "EXIDX";
> @@ -3591,10 +3567,6 @@
>      std::vector<EnumEntry<unsigned>> SectionFlags(std::begin(ElfSectionFlags),
>                                                    std::end(ElfSectionFlags));
>      switch (Obj->getHeader()->e_machine) {
> -    case EM_AMDGPU:
> -      SectionFlags.insert(SectionFlags.end(), std::begin(ElfAMDGPUSectionFlags),
> -                          std::end(ElfAMDGPUSectionFlags));
> -      break;
>      case EM_ARM:
>        SectionFlags.insert(SectionFlags.end(), std::begin(ElfARMSectionFlags),
>                            std::end(ElfARMSectionFlags));
> Index: test/tools/llvm-readobj/elf-sec-flags.test
> ===================================================================
> --- test/tools/llvm-readobj/elf-sec-flags.test
> +++ test/tools/llvm-readobj/elf-sec-flags.test
> @@ -1,29 +1,6 @@
>  # Check that llvm-readobj shows arch specific ELF section flags.
>  
> -# RUN: yaml2obj -docnum 1 %s > %t-amdgpu.o
> -# RUN: llvm-readobj -s %t-amdgpu.o | FileCheck -check-prefix=AMD %s
> -
> -# AMD:      Flags [ (0x300000)
> -# AMD-NEXT:   SHF_AMDGPU_HSA_GLOBAL (0x100000)
> -# AMD-NEXT:   SHF_AMDGPU_HSA_READONLY (0x200000)
> -# AMD-NEXT: ]
> -
> -# amdgpu.o
> ---- !ELF
> -FileHeader:
> -  Class:    ELFCLASS64
> -  Data:     ELFDATA2LSB
> -  OSABI:    ELFOSABI_GNU
> -  Type:     ET_REL
> -  Machine:  EM_AMDGPU
> -  Flags:    []
> -Sections:
> -  - Name:   .amdgpu
> -    Type:   SHT_PROGBITS
> -    Flags:  [SHF_AMDGPU_HSA_GLOBAL, SHF_AMDGPU_HSA_READONLY]
> -    Size:   4
> -
> -# RUN: yaml2obj -docnum 2 %s > %t-hex.o
> +# RUN: yaml2obj -docnum 1 %s > %t-hex.o
>  # RUN: llvm-readobj -s %t-hex.o | FileCheck -check-prefix=HEX %s
>  
>  # HEX:      Flags [ (0x10000000)
> @@ -44,7 +21,7 @@
>      Flags:  [SHF_HEX_GPREL]
>      Size:   4
>  
> -# RUN: yaml2obj -docnum 3 %s > %t-mips.o
> +# RUN: yaml2obj -docnum 2 %s > %t-mips.o
>  # RUN: llvm-readobj -s %t-mips.o | FileCheck -check-prefix=MIPS %s
>  
>  # MIPS:      Flags [ (0x38000000)
> @@ -67,7 +44,7 @@
>      Flags:  [SHF_MIPS_GPREL, SHF_MIPS_MERGE, SHF_MIPS_NOSTRIP]
>      Size:   4
>  
> -# RUN: yaml2obj -docnum 4 %s > %t-x86_64.o
> +# RUN: yaml2obj -docnum 3 %s > %t-x86_64.o
>  # RUN: llvm-readobj -s %t-x86_64.o | FileCheck -check-prefix=X86_64 %s
>  
>  # X86_64:      Flags [ (0x10000000)
> Index: test/tools/llvm-readobj/amdgpu-elf-defs.test
> ===================================================================
> --- test/tools/llvm-readobj/amdgpu-elf-defs.test
> +++ /dev/null
> @@ -1,28 +0,0 @@
> -RUN: llvm-readobj  -program-headers -sections -symbols -file-headers \
> -RUN: %p/Inputs/trivial.elf-amdhsa-kaveri | FileCheck %s
> -
> -CHECK: ElfHeader {
> -CHECK:  Ident {
> -CHECK: Class: 64-bit (0x2)
> -CHECK: DataEncoding: LittleEndian (0x1)
> -CHECK: Machine: EM_AMDGPU (0xE0)
> -
> -
> -CHECK: Section {
> -CHECK: Name: .text
> -CHECK: Type: SHT_PROGBITS (0x1)
> -CHECK: Flags [ (0xC00007
> -CHECK: SHF_ALLOC (0x2)
> -CHECK: SHF_AMDGPU_HSA_AGENT (0x800000)
> -CHECK: SHF_AMDGPU_HSA_CODE (0x400000)
> -CHECK: SHF_EXECINSTR (0x4)
> -CHECK: SHF_WRITE (0x1)
> -
> -CHECK: Symbol {
> -CHECK: Name: hello_world
> -CHECK: Value: 0x0
> -CHECK: Binding: Local (0x0)
> -CHECK: Type: AMDGPU_HSA_KERNEL (0xA)
> -
> -CHECK: ProgramHeader {
> -CHECK: Type: PT_AMDGPU_HSA_LOAD_CODE_AGENT (0x60000003)
> Index: test/tools/llvm-readobj/amdgpu-elf-definitions.test
> ===================================================================
> --- /dev/null
> +++ test/tools/llvm-readobj/amdgpu-elf-definitions.test
> @@ -0,0 +1,11 @@
> +RUN: llvm-readobj -file-headers -program-headers -sections -symbols %p/Inputs/trivial.obj.elf-amdhsa-gfx803 | FileCheck %s
> +
> +CHECK: Format: ELF64-amdgpu-hsacobj
> +CHECK: Arch: amdgcn
> +CHECK: ElfHeader {
> +CHECK:   Ident {
> +CHECK:     OS/ABI: AMDGPU_HSA (0x40)
> +CHECK:     ABIVersion: 0
> +CHECK:   }
> +CHECK:   Machine: EM_AMDGPU (0xE0)
> +CHECK: }
> Index: test/Object/AMDGPU/elf-definitions.yaml
> ===================================================================
> --- test/Object/AMDGPU/elf-definitions.yaml
> +++ test/Object/AMDGPU/elf-definitions.yaml
> @@ -3,15 +3,12 @@
>  
>  # CHECK: Format: ELF64-amdgpu-hsacobj
>  # CHECK: Arch: amdgcn
> -# CHECK:  Machine: EM_AMDGPU (0xE0)
> -# CHECK: Sections [
> -# CHECK: Section {
> -# CHECK: Name: .shf_amdgpu
> -# CHECK: Flags [ (0xF00000)
> -# CHECK: SHF_AMDGPU_HSA_AGENT (0x800000)
> -# CHECK: SHF_AMDGPU_HSA_CODE (0x400000)
> -# CHECK: SHF_AMDGPU_HSA_GLOBAL (0x100000)
> -# CHECK: SHF_AMDGPU_HSA_READONLY (0x200000)
> +# CHECK: ElfHeader {
> +# CHECK:   Ident {
> +# CHECK:     OS/ABI: AMDGPU_HSA (0x40)
> +# CHECK:     ABIVersion: 0
> +# CHECK:   }
> +# CHECK:   Machine: EM_AMDGPU (0xE0)
>  # CHECK: }
>  
>  --- !ELF
> @@ -21,10 +18,4 @@
>    Type:    ET_REL
>    Machine: EM_AMDGPU
>    OSABI:   ELFOSABI_AMDGPU_HSA
> -
> -Sections:
> -  - Name:  .shf_amdgpu
> -    Type:  SHT_PROGBITS
> -    Flags: [ SHF_AMDGPU_HSA_GLOBAL, SHF_AMDGPU_HSA_READONLY,
> -             SHF_AMDGPU_HSA_CODE, SHF_AMDGPU_HSA_AGENT]
>  ...
> Index: lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h
> ===================================================================
> --- lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h
> +++ lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h
> @@ -149,13 +149,6 @@
>  
>  void initDefaultAMDKernelCodeT(amd_kernel_code_t &Header,
>                                 const FeatureBitset &Features);
> -MCSection *getHSATextSection(MCContext &Ctx);
> -
> -MCSection *getHSADataGlobalAgentSection(MCContext &Ctx);
> -
> -MCSection *getHSADataGlobalProgramSection(MCContext &Ctx);
> -
> -MCSection *getHSARodataReadonlyAgentSection(MCContext &Ctx);
>  
>  bool isGroupSegment(const GlobalValue *GV, AMDGPUAS AS);
>  bool isGlobalSegment(const GlobalValue *GV, AMDGPUAS AS);
> Index: lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
> ===================================================================
> --- lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
> +++ lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
> @@ -327,33 +327,6 @@
>    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;
>  }
> Index: lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.h
> ===================================================================
> --- lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.h
> +++ lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.h
> @@ -44,10 +44,6 @@
>  
>    virtual void EmitAMDGPUSymbolType(StringRef SymbolName, unsigned Type) = 0;
>  
> -  virtual void EmitAMDGPUHsaModuleScopeGlobal(StringRef GlobalName) = 0;
> -
> -  virtual void EmitAMDGPUHsaProgramScopeGlobal(StringRef GlobalName) = 0;
> -
>    virtual void EmitStartOfCodeObjectMetadata(const Module &Mod);
>  
>    virtual void EmitKernelCodeObjectMetadata(
> @@ -74,10 +70,6 @@
>  
>    void EmitAMDGPUSymbolType(StringRef SymbolName, unsigned Type) override;
>  
> -  void EmitAMDGPUHsaModuleScopeGlobal(StringRef GlobalName) override;
> -
> -  void EmitAMDGPUHsaProgramScopeGlobal(StringRef GlobalName) override;
> -
>    /// \returns True on success, false on failure.
>    bool EmitCodeObjectMetadata(StringRef YamlString) override;
>  };
> @@ -105,10 +97,6 @@
>  
>    void EmitAMDGPUSymbolType(StringRef SymbolName, unsigned Type) override;
>  
> -  void EmitAMDGPUHsaModuleScopeGlobal(StringRef GlobalName) override;
> -
> -  void EmitAMDGPUHsaProgramScopeGlobal(StringRef GlobalName) override;
> -
>    /// \returns True on success, false on failure.
>    bool EmitCodeObjectMetadata(StringRef YamlString) override;
>  };
> Index: lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp
> ===================================================================
> --- lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp
> +++ lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp
> @@ -100,16 +100,6 @@
>    }
>  }
>  
> -void AMDGPUTargetAsmStreamer::EmitAMDGPUHsaModuleScopeGlobal(
> -    StringRef GlobalName) {
> -  OS << "\t.amdgpu_hsa_module_global " << GlobalName << '\n';
> -}
> -
> -void AMDGPUTargetAsmStreamer::EmitAMDGPUHsaProgramScopeGlobal(
> -    StringRef GlobalName) {
> -  OS << "\t.amdgpu_hsa_program_global " << GlobalName << '\n';
> -}
> -
>  bool AMDGPUTargetAsmStreamer::EmitCodeObjectMetadata(StringRef YamlString) {
>    auto VerifiedYamlString = CodeObjectMetadataStreamer.toYamlString(YamlString);
>    if (!VerifiedYamlString)
> @@ -214,24 +204,6 @@
>    Symbol->setType(ELF::STT_AMDGPU_HSA_KERNEL);
>  }
>  
> -void AMDGPUTargetELFStreamer::EmitAMDGPUHsaModuleScopeGlobal(
> -    StringRef GlobalName) {
> -
> -  MCSymbolELF *Symbol = cast<MCSymbolELF>(
> -      getStreamer().getContext().getOrCreateSymbol(GlobalName));
> -  Symbol->setType(ELF::STT_OBJECT);
> -  Symbol->setBinding(ELF::STB_LOCAL);
> -}
> -
> -void AMDGPUTargetELFStreamer::EmitAMDGPUHsaProgramScopeGlobal(
> -    StringRef GlobalName) {
> -
> -  MCSymbolELF *Symbol = cast<MCSymbolELF>(
> -      getStreamer().getContext().getOrCreateSymbol(GlobalName));
> -  Symbol->setType(ELF::STT_OBJECT);
> -  Symbol->setBinding(ELF::STB_GLOBAL);
> -}
> -
>  bool AMDGPUTargetELFStreamer::EmitCodeObjectMetadata(StringRef YamlString) {
>    auto VerifiedYamlString = CodeObjectMetadataStreamer.toYamlString(YamlString);
>    if (!VerifiedYamlString)
> Index: lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
> ===================================================================
> --- lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
> +++ lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
> @@ -811,14 +811,8 @@
>    bool ParseDirectiveCodeObjectMetadata();
>    bool ParseAMDKernelCodeTValue(StringRef ID, amd_kernel_code_t &Header);
>    bool ParseDirectiveAMDKernelCodeT();
> -  bool ParseSectionDirectiveHSAText();
>    bool subtargetHasRegister(const MCRegisterInfo &MRI, unsigned RegNo) const;
>    bool ParseDirectiveAMDGPUHsaKernel();
> -  bool ParseDirectiveAMDGPUHsaModuleGlobal();
> -  bool ParseDirectiveAMDGPUHsaProgramGlobal();
> -  bool ParseSectionDirectiveHSADataGlobalAgent();
> -  bool ParseSectionDirectiveHSADataGlobalProgram();
> -  bool ParseSectionDirectiveHSARodataReadonlyAgent();
>    bool AddNextRegisterToList(unsigned& Reg, unsigned& RegWidth,
>                               RegisterKind RegKind, unsigned Reg1,
>                               unsigned RegNum);
> @@ -2343,12 +2337,6 @@
>    return false;
>  }
>  
> -bool AMDGPUAsmParser::ParseSectionDirectiveHSAText() {
> -  getParser().getStreamer().SwitchSection(
> -      AMDGPU::getHSATextSection(getContext()));
> -  return false;
> -}
> -
>  bool AMDGPUAsmParser::ParseDirectiveAMDGPUHsaKernel() {
>    if (getLexer().isNot(AsmToken::Identifier))
>      return TokError("expected symbol name");
> @@ -2362,46 +2350,6 @@
>    return false;
>  }
>  
> -bool AMDGPUAsmParser::ParseDirectiveAMDGPUHsaModuleGlobal() {
> -  if (getLexer().isNot(AsmToken::Identifier))
> -    return TokError("expected symbol name");
> -
> -  StringRef GlobalName = Parser.getTok().getIdentifier();
> -
> -  getTargetStreamer().EmitAMDGPUHsaModuleScopeGlobal(GlobalName);
> -  Lex();
> -  return false;
> -}
> -
> -bool AMDGPUAsmParser::ParseDirectiveAMDGPUHsaProgramGlobal() {
> -  if (getLexer().isNot(AsmToken::Identifier))
> -    return TokError("expected symbol name");
> -
> -  StringRef GlobalName = Parser.getTok().getIdentifier();
> -
> -  getTargetStreamer().EmitAMDGPUHsaProgramScopeGlobal(GlobalName);
> -  Lex();
> -  return false;
> -}
> -
> -bool AMDGPUAsmParser::ParseSectionDirectiveHSADataGlobalAgent() {
> -  getParser().getStreamer().SwitchSection(
> -      AMDGPU::getHSADataGlobalAgentSection(getContext()));
> -  return false;
> -}
> -
> -bool AMDGPUAsmParser::ParseSectionDirectiveHSADataGlobalProgram() {
> -  getParser().getStreamer().SwitchSection(
> -      AMDGPU::getHSADataGlobalProgramSection(getContext()));
> -  return false;
> -}
> -
> -bool AMDGPUAsmParser::ParseSectionDirectiveHSARodataReadonlyAgent() {
> -  getParser().getStreamer().SwitchSection(
> -      AMDGPU::getHSARodataReadonlyAgentSection(getContext()));
> -  return false;
> -}
> -
>  bool AMDGPUAsmParser::ParseDirective(AsmToken DirectiveID) {
>    StringRef IDVal = DirectiveID.getString();
>  
> @@ -2417,27 +2365,9 @@
>    if (IDVal == ".amd_kernel_code_t")
>      return ParseDirectiveAMDKernelCodeT();
>  
> -  if (IDVal == ".hsatext")
> -    return ParseSectionDirectiveHSAText();
> -
>    if (IDVal == ".amdgpu_hsa_kernel")
>      return ParseDirectiveAMDGPUHsaKernel();
>  
> -  if (IDVal == ".amdgpu_hsa_module_global")
> -    return ParseDirectiveAMDGPUHsaModuleGlobal();
> -
> -  if (IDVal == ".amdgpu_hsa_program_global")
> -    return ParseDirectiveAMDGPUHsaProgramGlobal();
> -
> -  if (IDVal == ".hsadata_global_agent")
> -    return ParseSectionDirectiveHSADataGlobalAgent();
> -
> -  if (IDVal == ".hsadata_global_program")
> -    return ParseSectionDirectiveHSADataGlobalProgram();
> -
> -  if (IDVal == ".hsarodata_readonly_agent")
> -    return ParseSectionDirectiveHSARodataReadonlyAgent();
> -
>    return true;
>  }
>  
> Index: lib/ObjectYAML/ELFYAML.cpp
> ===================================================================
> --- lib/ObjectYAML/ELFYAML.cpp
> +++ lib/ObjectYAML/ELFYAML.cpp
> @@ -424,12 +424,6 @@
>    case ELF::EM_ARM:
>      BCase(SHF_ARM_PURECODE);
>      break;
> -  case ELF::EM_AMDGPU:
> -    BCase(SHF_AMDGPU_HSA_GLOBAL);
> -    BCase(SHF_AMDGPU_HSA_READONLY);
> -    BCase(SHF_AMDGPU_HSA_CODE);
> -    BCase(SHF_AMDGPU_HSA_AGENT);
> -    break;
>    case ELF::EM_HEXAGON:
>      BCase(SHF_HEX_GPREL);
>      break;
> Index: include/llvm/Support/ELF.h
> ===================================================================
> --- include/llvm/Support/ELF.h
> +++ include/llvm/Support/ELF.h
> @@ -808,12 +808,7 @@
>    SHF_MIPS_STRING = 0x80000000,
>  
>    // Make code section unreadable when in execute-only mode
> -  SHF_ARM_PURECODE = 0x20000000,
> -
> -  SHF_AMDGPU_HSA_GLOBAL = 0x00100000,
> -  SHF_AMDGPU_HSA_READONLY = 0x00200000,
> -  SHF_AMDGPU_HSA_CODE = 0x00400000,
> -  SHF_AMDGPU_HSA_AGENT = 0x00800000
> +  SHF_ARM_PURECODE = 0x20000000
>  };
>  
>  // Section Group Flags
> @@ -897,9 +892,7 @@
>    STT_HIPROC = 15,    // Highest processor-specific symbol type
>  
>    // AMDGPU symbol types
> -  STT_AMDGPU_HSA_KERNEL = 10,
> -  STT_AMDGPU_HSA_INDIRECT_FUNCTION = 11,
> -  STT_AMDGPU_HSA_METADATA = 12
> +  STT_AMDGPU_HSA_KERNEL = 10
>  };
>  
>  enum {
> @@ -1050,12 +1043,6 @@
>    PT_MIPS_OPTIONS = 0x70000002,  // Options segment.
>    PT_MIPS_ABIFLAGS = 0x70000003, // Abiflags segment.
>  
> -  // AMDGPU program header types.
> -  PT_AMDGPU_HSA_LOAD_GLOBAL_PROGRAM = 0x60000000,
> -  PT_AMDGPU_HSA_LOAD_GLOBAL_AGENT = 0x60000001,
> -  PT_AMDGPU_HSA_LOAD_READONLY_AGENT = 0x60000002,
> -  PT_AMDGPU_HSA_LOAD_CODE_AGENT = 0x60000003,
> -
>    // WebAssembly program header types.
>    PT_WEBASSEMBLY_FUNCTIONS = PT_LOPROC + 0, // Function definitions.
>  };
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits


More information about the llvm-commits mailing list