diff options
author | Pierre van Houtryve <pierre.vanhoutryve@amd.com> | 2023-10-16 08:21:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-16 08:21:48 +0200 |
commit | 544d91280c26fd5f7acd70eac4d667863562f4cc (patch) | |
tree | dbf96470f0354e16e3c49d08679d4aebba6c7850 /llvm/lib/Target/AMDGPU/Utils | |
parent | cd88466dafdb1137196eaa04527c3aa4c742328f (diff) | |
download | llvm-544d91280c26fd5f7acd70eac4d667863562f4cc.zip llvm-544d91280c26fd5f7acd70eac4d667863562f4cc.tar.gz llvm-544d91280c26fd5f7acd70eac4d667863562f4cc.tar.bz2 |
[AMDGPU] Remove Code Object V3 (#67118)
V3 has been deprecated for a while as well, so it can safely be removed
like V2 was removed.
- [Clang] Set minimum code object version to 4
- [lld] Fix tests using code object v3
- Remove code object V3 from the AMDGPU backend, and delete or port v3
tests to v4.
- Update docs to make it clear V3 can no longer be emitted.
Diffstat (limited to 'llvm/lib/Target/AMDGPU/Utils')
-rw-r--r-- | llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp | 21 | ||||
-rw-r--r-- | llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h | 9 |
2 files changed, 1 insertions, 29 deletions
diff --git a/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp b/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp index d123b38..5fff19e 100644 --- a/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp +++ b/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp @@ -128,8 +128,6 @@ std::optional<uint8_t> getHsaAbiVersion(const MCSubtargetInfo *STI) { return std::nullopt; switch (AmdhsaCodeObjectVersion) { - case 3: - return ELF::ELFABIVERSION_AMDGPU_HSA_V3; case 4: return ELF::ELFABIVERSION_AMDGPU_HSA_V4; case 5: @@ -140,12 +138,6 @@ std::optional<uint8_t> getHsaAbiVersion(const MCSubtargetInfo *STI) { } } -bool isHsaAbiVersion3(const MCSubtargetInfo *STI) { - if (std::optional<uint8_t> HsaAbiVer = getHsaAbiVersion(STI)) - return *HsaAbiVer == ELF::ELFABIVERSION_AMDGPU_HSA_V3; - return false; -} - bool isHsaAbiVersion4(const MCSubtargetInfo *STI) { if (std::optional<uint8_t> HsaAbiVer = getHsaAbiVersion(STI)) return *HsaAbiVer == ELF::ELFABIVERSION_AMDGPU_HSA_V4; @@ -174,7 +166,6 @@ unsigned getCodeObjectVersion(const Module &M) { unsigned getMultigridSyncArgImplicitArgPosition(unsigned CodeObjectVersion) { switch (CodeObjectVersion) { - case AMDHSA_COV3: case AMDHSA_COV4: return 48; case AMDHSA_COV5: @@ -188,7 +179,6 @@ unsigned getMultigridSyncArgImplicitArgPosition(unsigned CodeObjectVersion) { // central TD file. unsigned getHostcallImplicitArgPosition(unsigned CodeObjectVersion) { switch (CodeObjectVersion) { - case AMDHSA_COV3: case AMDHSA_COV4: return 24; case AMDHSA_COV5: @@ -199,7 +189,6 @@ unsigned getHostcallImplicitArgPosition(unsigned CodeObjectVersion) { unsigned getDefaultQueueImplicitArgPosition(unsigned CodeObjectVersion) { switch (CodeObjectVersion) { - case AMDHSA_COV3: case AMDHSA_COV4: return 32; case AMDHSA_COV5: @@ -210,7 +199,6 @@ unsigned getDefaultQueueImplicitArgPosition(unsigned CodeObjectVersion) { unsigned getCompletionActionImplicitArgPosition(unsigned CodeObjectVersion) { switch (CodeObjectVersion) { - case AMDHSA_COV3: case AMDHSA_COV4: return 40; case AMDHSA_COV5: @@ -774,15 +762,6 @@ std::string AMDGPUTargetID::toString() const { std::string Features; if (STI.getTargetTriple().getOS() == Triple::AMDHSA) { switch (CodeObjectVersion) { - case AMDGPU::AMDHSA_COV3: - // xnack. - if (isXnackOnOrAny()) - Features += "+xnack"; - // In code object v2 and v3, "sramecc" feature was spelled with a - // hyphen ("sram-ecc"). - if (isSramEccOnOrAny()) - Features += "+sram-ecc"; - break; case AMDGPU::AMDHSA_COV4: case AMDGPU::AMDHSA_COV5: // sramecc. diff --git a/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h b/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h index bb2964f..1e0994d 100644 --- a/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h +++ b/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h @@ -42,19 +42,12 @@ namespace AMDGPU { struct IsaVersion; -enum { - AMDHSA_COV3 = 3, - AMDHSA_COV4 = 4, - AMDHSA_COV5 = 5 -}; +enum { AMDHSA_COV4 = 4, AMDHSA_COV5 = 5 }; /// \returns True if \p STI is AMDHSA. bool isHsaAbi(const MCSubtargetInfo &STI); /// \returns HSA OS ABI Version identification. std::optional<uint8_t> getHsaAbiVersion(const MCSubtargetInfo *STI); -/// \returns True if HSA OS ABI Version identification is 3, -/// false otherwise. -bool isHsaAbiVersion3(const MCSubtargetInfo *STI); /// \returns True if HSA OS ABI Version identification is 4, /// false otherwise. bool isHsaAbiVersion4(const MCSubtargetInfo *STI); |