[Openmp-commits] [PATCH] D69885: [libomptarget] Revert all improvements to support

Jon Chesterfield via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Nov 6 02:59:08 PST 2019


JonChesterfield created this revision.
JonChesterfield added reviewers: ABataev, jdoerfert, grokos, ikitayama, tianshilei1992.
Herald added subscribers: openmp-commits, jfb.
Herald added a project: OpenMP.
JonChesterfield updated this revision to Diff 228032.
JonChesterfield added a comment.
Herald added a subscriber: mgorny.

- include build files


[libomptarget] Revert all improvements to support

nvcc miscompiles __inline__ and __forceinline__. Specifically, if there is a
call of an inline function before the definition, that call is not inlined
and it is not considered when deciding to discard the inline function. This
means a function cannot be declared in a header and then annotated as inline
in the source.

Consequently the unity build, which was intended to work around nvcc failing
to implement link time optimisation, fails at link time on missing symbols
which should not have been deleted.

This revert has taken a few days because the conditions under which nvcc fails
in this manner are unclear. It works on my machine but not for some other devs.

This therefore reintroduces the dependency hazard of supporti.h and some code
duplication, and blocks progress separating deviceRTL into reusable components.

See also D69857 <https://reviews.llvm.org/D69857>, D69859 <https://reviews.llvm.org/D69859> for attempts at a fix instead of a revert.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D69885

Files:
  openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt
  openmp/libomptarget/deviceRTLs/nvptx/src/data_sharing.cu
  openmp/libomptarget/deviceRTLs/nvptx/src/debug.h
  openmp/libomptarget/deviceRTLs/nvptx/src/libcall.cu
  openmp/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.h
  openmp/libomptarget/deviceRTLs/nvptx/src/support.cu
  openmp/libomptarget/deviceRTLs/nvptx/src/support.h
  openmp/libomptarget/deviceRTLs/nvptx/src/supporti.h
  openmp/libomptarget/deviceRTLs/nvptx/src/target_impl.h
  openmp/libomptarget/deviceRTLs/nvptx/unity.cu

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69885.228032.patch
Type: text/x-patch
Size: 14971 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20191106/7cc40ca1/attachment-0001.bin>


More information about the Openmp-commits mailing list