LTO::RegularLTOState::CombinedModule and LTO::RegularLTOState::Mover do not have
to be pointers.
LTO::RegularLTOState::HasCombinedModule is needed to have this patch as NFC.
It should be removed by D41267.
Paths
| Differential D41274
[LTO] NFC: remove unique_ptr from some LTO::RegularLTOState members AbandonedPublic Authored by vitalybuka on Dec 14 2017, 11:44 PM.
Details
Diff Detail
Event TimelineHerald added subscribers: hiraditya, inglorion, mehdi_amini. · View Herald TranscriptDec 14 2017, 11:44 PM Comment Actions This patch doesn't seem motivated, the only effect I can see is that a ThinLTO link that don't include any LTO module would create a module while it was lazily created only if needed before.
Comment Actions
Yes, this was motivated only by comment on D41267.
Revision Contents
Diff 127071 llvm/include/llvm/LTO/LTO.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/Transforms/Utils/SplitModule.cpp
llvm/tools/llvm-split/llvm-split.cpp
|
Sorry, I forgot about the fact that this function takes a unique_ptr. In that case it would probably be fine to leave the CombinedModule field as a unique_ptr but just move its initialization to the constructor.