[Openmp-commits] [PATCH] D69489: [libomptarget] Change nvcc compilation to use a unity build

Jon Chesterfield via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Oct 30 12:38:24 PDT 2019


JonChesterfield added a comment.

My understanding of this cmake is that nvptx is built as both a static archive and as a llvm-link'ed bitcode archive. The former suggests a toolchain that may not be capable of LTO, the latter suggests a toolchain that definitely is. When llvm-link is available, so is opt.

I'd like to compile the translation units separately when we can. Incremental builds don't matter hugely as the build time is negligible. However separate compilation means we don't pick up spurious relationships between source files. E.g. if data_sharing.cu adds a static function that gets called from loop.cu, the concatenated build will work just fine but a standalone one wouldn't. It also means headers must be present in all compilation units that use them, instead of included from at least one unit that gets `#included` earlier.

Strongly in agreement with your build model of linking the deviceRTL with the application code. I see the header/source/library boundaries as useful for developers and necessary to erase at compile time.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D69489





More information about the Openmp-commits mailing list