[Openmp-commits] [PATCH] D71404: [libomptarget][nfc] Introduce atomic wrapper function

Jon Chesterfield via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Dec 12 17:57:09 PST 2019


JonChesterfield added a comment.

There's an outstanding design point here.

Logically, the implementation is per target so should be in arch/src/target_atomic.h, with call sites including target_atomic.

However, the nvptx and amdgcn implementations will be (somewhat spuriously) the same. So either copy & paste time, or each needs to include a header from common containing the implementation which is otherwise not included anywhere.

This awkward redirection is necessary under the current scheme to allow a new arch to provide a header that is picked up by common/src/foo.cpp.

I wonder if that means a different redirection scheme is better, e.g. where headers are used from common unless one with the same name is provided under the arch. That seems error prone however.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71404





More information about the Openmp-commits mailing list