[HIP] Support code object v5
authorYaxun (Sam) Liu <yaxun.liu@amd.com>
Thu, 3 Feb 2022 19:07:45 +0000 (14:07 -0500)
committerYaxun (Sam) Liu <yaxun.liu@amd.com>
Fri, 4 Feb 2022 14:55:08 +0000 (09:55 -0500)
commitd4e4ef2e81e03246e29e9b6eaa2929ebd4e77784
tree27e66b24dfecab0df38133d92905746d114d620d
parent001cb43159f33146b0a605126663da71f4847b7d
[HIP] Support code object v5

New device library supporting v4 and v5 has abi_version_400.bc and abi
version_500.bc.

For v5, abi_version_500.bc is linked.

For v2-4, abi_version_400.bc is linked.

For old device library, for v2-4, none of the above is linked. For v5,
error is emitted about unsupported ABI version.

Reviewed by: Artem Belevich

Differential Revision: https://reviews.llvm.org/D118949

Fixes: SWDEV-321313
31 files changed:
clang/include/clang/Basic/DiagnosticDriverKinds.td
clang/include/clang/Driver/Options.td
clang/lib/Driver/ToolChains/AMDGPU.cpp
clang/lib/Driver/ToolChains/AMDGPU.h
clang/lib/Driver/ToolChains/CommonArgs.cpp
clang/lib/Driver/ToolChains/ROCm.h
clang/test/Driver/Inputs/rocm/amdgcn/bitcode-no-abi-ver/asanrtl.bc [new file with mode: 0644]
clang/test/Driver/Inputs/rocm/amdgcn/bitcode-no-abi-ver/hip.bc [new file with mode: 0644]
clang/test/Driver/Inputs/rocm/amdgcn/bitcode-no-abi-ver/ockl.bc [new file with mode: 0644]
clang/test/Driver/Inputs/rocm/amdgcn/bitcode-no-abi-ver/oclc_correctly_rounded_sqrt_off.bc [new file with mode: 0644]
clang/test/Driver/Inputs/rocm/amdgcn/bitcode-no-abi-ver/oclc_correctly_rounded_sqrt_on.bc [new file with mode: 0644]
clang/test/Driver/Inputs/rocm/amdgcn/bitcode-no-abi-ver/oclc_daz_opt_off.bc [new file with mode: 0644]
clang/test/Driver/Inputs/rocm/amdgcn/bitcode-no-abi-ver/oclc_daz_opt_on.bc [new file with mode: 0644]
clang/test/Driver/Inputs/rocm/amdgcn/bitcode-no-abi-ver/oclc_finite_only_off.bc [new file with mode: 0644]
clang/test/Driver/Inputs/rocm/amdgcn/bitcode-no-abi-ver/oclc_finite_only_on.bc [new file with mode: 0644]
clang/test/Driver/Inputs/rocm/amdgcn/bitcode-no-abi-ver/oclc_isa_version_1010.bc [new file with mode: 0644]
clang/test/Driver/Inputs/rocm/amdgcn/bitcode-no-abi-ver/oclc_isa_version_1011.bc [new file with mode: 0644]
clang/test/Driver/Inputs/rocm/amdgcn/bitcode-no-abi-ver/oclc_isa_version_1012.bc [new file with mode: 0644]
clang/test/Driver/Inputs/rocm/amdgcn/bitcode-no-abi-ver/oclc_isa_version_803.bc [new file with mode: 0644]
clang/test/Driver/Inputs/rocm/amdgcn/bitcode-no-abi-ver/oclc_isa_version_900.bc [new file with mode: 0644]
clang/test/Driver/Inputs/rocm/amdgcn/bitcode-no-abi-ver/oclc_isa_version_908.bc [new file with mode: 0644]
clang/test/Driver/Inputs/rocm/amdgcn/bitcode-no-abi-ver/oclc_unsafe_math_off.bc [new file with mode: 0644]
clang/test/Driver/Inputs/rocm/amdgcn/bitcode-no-abi-ver/oclc_unsafe_math_on.bc [new file with mode: 0644]
clang/test/Driver/Inputs/rocm/amdgcn/bitcode-no-abi-ver/oclc_wavefrontsize64_off.bc [new file with mode: 0644]
clang/test/Driver/Inputs/rocm/amdgcn/bitcode-no-abi-ver/oclc_wavefrontsize64_on.bc [new file with mode: 0644]
clang/test/Driver/Inputs/rocm/amdgcn/bitcode-no-abi-ver/ocml.bc [new file with mode: 0644]
clang/test/Driver/Inputs/rocm/amdgcn/bitcode-no-abi-ver/opencl.bc [new file with mode: 0644]
clang/test/Driver/Inputs/rocm/amdgcn/bitcode/abi_version_400.bc [new file with mode: 0644]
clang/test/Driver/Inputs/rocm/amdgcn/bitcode/abi_version_500.bc [new file with mode: 0644]
clang/test/Driver/hip-code-object-version.hip
clang/test/Driver/hip-device-libs.hip