[PATCH] D130096: [Clang][AMDGPU] Emit AMDGPU library control constants in clang

Joseph Huber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 19 10:14:11 PDT 2022


jhuber6 added a comment.

In D130096#3663010 <https://reviews.llvm.org/D130096#3663010>, @JonChesterfield wrote:

> Tagging Brian as the code owner of rocm device libs - emitting these in clang would simplify that library.
>
> Currently clang reads these commandline flags and conditionally links in bitcode files to introduce these symbols. There's existing command line flags for controlling which files are linked. I think this patch should probably use the existing flags to choose which values to set and delete the existing handling.
>
> As written I think this is a no op, in that the libraries will currently be linked anyway and override the symbols clang has injected

Yeah, I wasn't sure if I should do some scan to check if we actually need these. Basically just check if any function declarations start with `__ocml`. But that might untenable in the future as we try to move to a generic math library that doesn't eagerly emit target specific declarations in clang.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130096/new/

https://reviews.llvm.org/D130096



More information about the cfe-commits mailing list