This is an archive of the discontinued LLVM Phabricator instance.

[libomptarget][nfc] Move omp locks under target_impl
ClosedPublic

Authored by JonChesterfield on Dec 16 2019, 2:59 PM.

Details

Summary

[libomptarget][nfc] Move omp locks under target_impl

These are likely to be target specific, even down to the lock_t which is
correspondingly moved out of interface.h. The alternative is to include
interface.h in target_impl which substantiatially increases the scope of
those symbols.

The current nvptx implementation deadlocks on amdgcn. The preferred
implementation for that arch is still under discussion - this change
leaves declarations in target_impl.

The functions could be inline for nvptx. I'd prefer to keep the internals
hidden in the target_impl translation unit, but will add the (possibly renamed)
macros to target_impl.h if preferred.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptDec 16 2019, 2:59 PM
This revision is now accepted and ready to land.Dec 16 2019, 3:47 PM

Thanks. This is most of the target specific code in libcall, the remaining function is for omp_get_wtime. I'll put up a patch for that shortly.

  • Move print statements back into generic functions
JonChesterfield added a comment.EditedDec 16 2019, 5:39 PM

Apologies for changing the patch post review. The print calls are now back in the omp_ prefixed functions. That seems a better separation of concerns.

This revision was automatically updated to reflect the committed changes.