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

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


  Branch: refs/heads/users/shiltian/rework-offloadtargetinfo-ctor
  Home:   https://github.com/llvm/llvm-project
  Commit: 1b69731de90e57c66d36ed2e5dac01cbfd84c91b
      https://github.com/llvm/llvm-project/commit/1b69731de90e57c66d36ed2e5dac01cbfd84c91b
  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