[all-commits] [llvm/llvm-project] 90ccf2: [LinkerWrapper] Extend with usual pass options (#9...
Joel E. Denny via All-commits
all-commits at lists.llvm.org
Thu Jul 11 08:41:56 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 90ccf2187332ff900d46a58a27cb0353577d37cb
https://github.com/llvm/llvm-project/commit/90ccf2187332ff900d46a58a27cb0353577d37cb
Author: Joel E. Denny <jdenny.ornl at gmail.com>
Date: 2024-07-11 (Thu, 11 Jul 2024)
Changed paths:
M clang/test/CMakeLists.txt
A clang/test/Driver/linker-wrapper-llvm-help.c
A clang/test/Driver/linker-wrapper-passes.c
M clang/test/lit.cfg.py
M clang/test/lit.site.cfg.py.in
M clang/tools/clang-linker-wrapper/CMakeLists.txt
M clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp
M clang/tools/clang-linker-wrapper/LinkerWrapperOpts.td
Log Message:
-----------
[LinkerWrapper] Extend with usual pass options (#96704)
The goal of this patch is to enable utilizing LLVM plugin passes and
remarks for GPU offload code at link time. Specifically, this patch
extends clang-linker-wrapper's `--offload-opt` (and consequently
`-mllvm`) to accept the various LLVM pass options that tools like opt
usually accept. Those options include `--passes`, `--load-pass-plugin`,
and various remarks options.
Unlike many other LLVM options that are inherited from linked code by
clang-linker-wrapper (e.g., `-pass-remarks` is already implemented in
`llvm/lib/IR/DiagnosticHandler.cpp`), these options are implemented
separately as needed by each tool (e.g., opt, llc). Fortunately, this
patch is able to handle most of the implementation by passing the option
values to `lto::Config`.
For testing plugin support, this patch uses the simple `Bye` plugin from
LLVM core, but that requires several small Clang test suite config
extensions.
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