[PATCH] D87841: [openmp][libomptarget] Include header from LLVM source tree

Jon Chesterfield via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 17 10:17:00 PDT 2020


JonChesterfield created this revision.
JonChesterfield added reviewers: jlpeyton, AndreyChurbanov, Hahnfeld, protze.joachim, ABataev, gtbercea, grokos, tianshilei1992, pawosm01, dim, jdenny, mgorny, jcownie, hans, jdoerfert, hfinkel, ye-luo.
Herald added subscribers: llvm-commits, openmp-commits, kerbowa, guansong, tpr, yaxunl, nhaehnle, jvesely.
Herald added projects: OpenMP, LLVM.
JonChesterfield requested review of this revision.
Herald added a subscriber: sstefan1.

[openmp][libomptarget] Include header from LLVM source tree

The change is to the amdgpu plugin so is unlikely to break anything.

The point of contention is whether libomptarget can depend on LLVM.
A community discussion was cautiously not opposed yesterday.

This introduces a compile time dependency on the LLVM source tree, in this case
expressed as skipping the building of the plugin if LLVM_MAIN_INCLUDE_DIR is not
set. One the source files will #include llvm/Frontend/OpenMP/OMPGridValues.h,
instead of copy&pasting the numbers across.

As openmp and llvm are now developed in the same monorepo, the only uses this
dependency can break are those that download the monorepo, then delete the llvm
directory before calling cmake. That is not a compelling use case.

There was interest expressed in going further - using llvm tools as part of
building libomp, or linking against llvm libraries. That seems less clear cut
an improvement and worthy of further discussion. This patch seeks only to change
policy to support openmp depending on the llvm source tree. Including in the
other direction, or using libraries / tools etc, are purposefully out of scope.

Reviewers are a best guess at interested parties, please feel free to add others


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D87841

Files:
  llvm/include/llvm/Frontend/OpenMP/OMPGridValues.h
  openmp/libomptarget/plugins/amdgpu/CMakeLists.txt
  openmp/libomptarget/plugins/amdgpu/src/rtl.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87841.292552.patch
Type: text/x-patch
Size: 5174 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200917/fca09283/attachment-0001.bin>


More information about the llvm-commits mailing list