[all-commits] [llvm/llvm-project] c58bbd: [OffloadBundler] Rework the ctor of `OffloadTarget...

Shilei Tian via All-commits all-commits at lists.llvm.org
Sun Jan 12 07:52:59 PST 2025


  Branch: refs/heads/users/shiltian/rework-offloadtargetinfo-ctor
  Home:   https://github.com/llvm/llvm-project
  Commit: c58bbd1edcc295a03d68a311a16080550c6aea96
      https://github.com/llvm/llvm-project/commit/c58bbd1edcc295a03d68a311a16080550c6aea96
  Author: Shilei Tian <i at tianshilei.me>
  Date:   2025-01-12 (Sun, 12 Jan 2025)

  Changed paths:
    M clang/docs/ClangOffloadBundler.rst
    M clang/lib/Driver/OffloadBundler.cpp
    M clang/test/Driver/clang-offload-bundler-asserts-on.c
    M clang/test/Driver/clang-offload-bundler-standardize.c
    M clang/test/Driver/clang-offload-bundler-zstd.c
    M clang/test/Driver/clang-offload-bundler.c
    M llvm/utils/lit/lit/llvm/config.py

  Log Message:
  -----------
  [OffloadBundler] Rework the ctor of `OffloadTargetInfo` to support generic target

The current parsing of target string assumes to be in a form of
`kind-triple-targetid:feature`, such as
`hipv4-amdgcn-amd-amdhsa-gfx1030:+xnack`. Specifically, the target id does not
contain any `-`, which is not the case for generic target. Also, a generic
target may contain one or more `-`, such as `gfx10-3-generic` and
`gfx12-generic`. As a result, we can no longer depend on `rstrip` to get things
work right. This patch reworks the logic to parse the target string to make it
more robust, as well as supporting generic target.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list