[PATCH] D95222: [LTO] Update splitCodeGen to take a reference to the module. (NFC)

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 27 16:10:47 PST 2021


tejohnson added a comment.

In D95222#2525197 <https://reviews.llvm.org/D95222#2525197>, @fhahn wrote:

> Updated splitCodeGen & co to pass the module by reference instead of taking ownership. splitCodeGen clones the original module before carving it up, so it does not need ownership and it simplifies the code. We can change it back to taking ownership, once it is actually required.

Will that cause issues if ownership is required down the line? If so, perhaps just remove the fixme about avoiding cloning the module for the last partition.



================
Comment at: llvm/include/llvm/CodeGen/ParallelCG.h:36
 ///
 /// \returns M if OSs.size() == 1, otherwise returns std::unique_ptr<Module>().
+void splitCodeGen(
----------------
Update comment


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D95222



More information about the llvm-commits mailing list