[PATCH] D96248: [OpenMP][AMDGPU] Add support for linking libomptarget bitcode
Shilei Tian via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 8 15:28:26 PST 2021
tianshilei1992 added a comment.
Generally LGTM.
In D96248#2549339 <https://reviews.llvm.org/D96248#2549339>, @JonChesterfield wrote:
> The existing search logic looks in clang's lib and LIBRARY_PATH, I think we should probably look in the runtime directory as well for running from the build tree. That's separate to this change though.
I don't think it's necessary as we can add the runtime directory to `LIBRARY_PATH` when configuring `lit`.
================
Comment at: clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp:193
CC1Args.push_back("-emit-llvm-bc");
+
+ std::string BitcodeSuffix = "amdgcn-" + GpuArch.str();
----------------
JonChesterfield wrote:
> Need `if (DriverArgs.hasArg(options::OPT_nogpulib)) return;` here or we can't build the deviceRTL without already having one on disk
FWIW, NVPTX `deviceRTLs` is built by directly calling FE, not via clang driver. `clang -fopenmp -fopenmp-targets=xxx` basically consists of two passes, and therefore generates two IRs, which is not what we expect. I'm not sure we really need the if statement.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96248/new/
https://reviews.llvm.org/D96248
More information about the cfe-commits
mailing list