[all-commits] [llvm/llvm-project] fa0f90: [HIP] Support linking archive of bundled bitcode

Yaxun (Sam) Liu via All-commits all-commits at lists.llvm.org
Sat Feb 19 16:14:11 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fa0f90bc55ed536e1488648255278ce9029cfa59
      https://github.com/llvm/llvm-project/commit/fa0f90bc55ed536e1488648255278ce9029cfa59
  Author: Yaxun (Sam) Liu <yaxun.liu at amd.com>
  Date:   2022-02-19 (Sat, 19 Feb 2022)

  Changed paths:
    M clang/lib/Driver/ToolChains/HIPAMD.cpp
    M clang/test/Driver/clang-offload-bundler.c
    A clang/test/Driver/hip-link-bundle-archive.hip

  Log Message:
  -----------
  [HIP] Support linking archive of bundled bitcode

HIP programs compiled with -c -fgpu-rdc generate clang-offload-bundler
bundles which contain bitcode for different GPU's.

Such files can be archived to an archive file which can be linked with
HIP programs with -fgpu-rdc.

This patch adds suppor of linking archive of bundled bitcode.

When an archive of bundled bitcode is passed to clang by -l, for each
GPU specified through --offload-arch, clang extracts bitcode from
the archive and creates a new archive for that GPU and pass it
to lld.

Reviewed by: Artem Belevich

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

Fixes: SWDEV-321741, SWDEV-315773




More information about the All-commits mailing list