Currently the OpenMP offloading device runtime is only expected to be
compiled for the specific architecture it's targeting. This is
problematic if we want to make compiling the device runtime more general
via the standar clang driver rather than invoking the clang front-end
directly. This patch addresses this by primarily changing the declare
type to nohost so the host will not contain any of this code.
Additionally we forward declare the functions that are defined via
variants, otherwise these would cause problems on the host.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
openmp/libomptarget/DeviceRTL/src/Synchronization.cpp | ||
---|---|---|
66 | Will do. |
Comment Actions
I'm not super happy about the forward decls. Should we augment begin declare tatrget with begin declare variant match(device={kind(nohost)}) instead?
Comment Actions
Do you mean by changing the declare? Or by nesting variants. I wasn't sure if that worked.
Comment Actions
I think we are lacking a good way to do what I want, let's go ahead with forward declares for now.
Could you add some comments here saying that's just a declaration and every target has to implement them.