[all-commits] [llvm/llvm-project] 194ec8: [OpenMP][AMDGPU] Link bitcode ROCm device librarie...
Joseph Huber via All-commits
all-commits at lists.llvm.org
Wed Sep 14 07:42:29 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 194ec844f5c67306f505a3418038c5e75859bad8
https://github.com/llvm/llvm-project/commit/194ec844f5c67306f505a3418038c5e75859bad8
Author: Joseph Huber <jhuber6 at vols.utk.edu>
Date: 2022-09-14 (Wed, 14 Sep 2022)
Changed paths:
M clang/include/clang/Driver/ToolChain.h
M clang/lib/Driver/ToolChain.cpp
M clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp
M clang/lib/Driver/ToolChains/AMDGPUOpenMP.h
M clang/lib/Driver/ToolChains/Clang.cpp
M clang/lib/Driver/ToolChains/HIPAMD.cpp
M clang/lib/Driver/ToolChains/HIPAMD.h
M clang/lib/Driver/ToolChains/HIPSPV.cpp
M clang/lib/Driver/ToolChains/HIPSPV.h
M clang/test/Driver/amdgpu-openmp-toolchain.c
Log Message:
-----------
[OpenMP][AMDGPU] Link bitcode ROCm device libraries per-TU
Previously, we linked in the ROCm device libraries which provide math
and other utility functions late. This is not stricly correct as this
library contains several flags that are only set per-TU, such as fast
math or denormalization. This patch changes this to pass the bitcode
libraries per-TU using the same method we use for the CUDA libraries.
This has the advantage that we correctly propagate attributes making
this implementation more correct. Additionally, many annoying unused
functions were not being fully removed during LTO. This lead to
erroneous warning messages and remarks on unused functions.
I am not sure if not finding these libraries should be a hard error. let
me know if it should be demoted to a warning saying that some device
utilities will not work without them.
Reviewed By: JonChesterfield
Differential Revision: https://reviews.llvm.org/D133726
More information about the All-commits
mailing list