This patch created a new header file target_interface.h for declarations of all target dependent functions. All future targets can get things work by simply implementing all functions declared in the header and macros/data same as each target_impl.h.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
openmp/libomptarget/deviceRTLs/amdgcn/src/target_impl.h | ||
---|---|---|
69–70 | All the declarations that moved to targwt_interface should be deleted from here (as well as from nvptx target_impl) | |
openmp/libomptarget/deviceRTLs/common/omptarget.h | ||
333 | Just INLINE? | |
openmp/libomptarget/deviceRTLs/target_interface.h | ||
28 | I guess these should be EXTERN, not extern DEVICE |
'new header file target_impl.h' should be 'new header file target_interface.h' in the commit message
Couple of minor points about redundant function annotations, otherwise good. Thanks for moving the amdgpu code out of the header.
I wonder if the kmpc_impl functions should be consistently extern C, at least when not overloaded.
openmp/libomptarget/deviceRTLs/common/omptarget.h | ||
---|---|---|
333 | I mean, INLINE expands to a definition that includes DEVICE, so we don't need both | |
openmp/libomptarget/deviceRTLs/target_interface.h | ||
28 | Ah, so 'extern' here is dead. Functions are non-static by default. |
openmp/libomptarget/deviceRTLs/amdgcn/src/target_impl.hip | ||
---|---|---|
192 | I missed the language linkage change from c++ to c on these, fixed on main. |
All the declarations that moved to targwt_interface should be deleted from here (as well as from nvptx target_impl)