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

Jon Chesterfield via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Feb 11 12:21:54 PST 2021


JonChesterfield added inline comments.


================
Comment at: openmp/libomptarget/deviceRTLs/amdgcn/src/amdgcn_intrinsics.h:46
+
+#endif
----------------
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.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96533



More information about the Openmp-commits mailing list