[PATCH] D95222: [LTO] Update splitCodeGen to take a reference to the module. (NFC)
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 28 08:20:48 PST 2021
fhahn updated this revision to Diff 319877.
fhahn added a comment.
In D95222#2526788 <https://reviews.llvm.org/D95222#2526788>, @tejohnson wrote:
> 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.
Yes, I think some additional changes will be needed to address the fixme. I think the fixme is still valuable, so rather than removing it I added a note about callers not expecting the module to change, so whoever addresses the fixme is aware that further changes are need. (The simplest fix would be to just clone the original module once).
What do you think?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95222/new/
https://reviews.llvm.org/D95222
Files:
llvm/include/llvm/CodeGen/ParallelCG.h
llvm/include/llvm/LTO/LTOBackend.h
llvm/include/llvm/Transforms/Utils/SplitModule.h
llvm/lib/CodeGen/ParallelCG.cpp
llvm/lib/LTO/LTO.cpp
llvm/lib/LTO/LTOBackend.cpp
llvm/lib/LTO/LTOCodeGenerator.cpp
llvm/lib/Transforms/Utils/SplitModule.cpp
llvm/tools/llvm-split/llvm-split.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95222.319877.patch
Type: text/x-patch
Size: 12182 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210128/016515a3/attachment.bin>
More information about the llvm-commits
mailing list