[Openmp-commits] [PATCH] D96533: [libomptarget][amdgcn] Build amdgcn devicertl as openmp

Johannes Doerfert via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Feb 11 13:28:44 PST 2021

jdoerfert added inline comments.

Comment at: openmp/libomptarget/deviceRTLs/amdgcn/src/amdgcn_intrinsics.h:46
JonChesterfield wrote:
> jdoerfert wrote:
> > Do we need to declare builtins? I guess we can but we should not have to, right?
> Today, yes. I think the 'right' behaviour is to allow these within an appropriate declare variant, and an adequate approximation would be to allow them everywhere.
> As raw openmp, the assumption is that any function can be called from the host. That doesn't mean anything for __builtin_amdgcn_dispatch_ptr, so it's reasonable that these aren't automatically available.
> At present though, I'm just trying to get this library to compile with trunk clang as-is. Curiously, if one of these is declared with the wrong type, clang emits an error on the declaration.
I can just call these like other builtins (when I target amdgcn):

  rG LLVM Github Monorepo



More information about the Openmp-commits mailing list