[LTO] Make processing of combined module more consistent
authorVitaly Buka <vitalybuka@google.com>
Sat, 16 Dec 2017 02:10:00 +0000 (02:10 +0000)
committerVitaly Buka <vitalybuka@google.com>
Sat, 16 Dec 2017 02:10:00 +0000 (02:10 +0000)
commita5376f393e128929280d8052b01dbfc4d93e0960
tree42329494180ef8cb0a659c319211a4cd920ade97
parentcc15219fb1eb7d536fb40ffed7e4a6a779eb23ff
[LTO] Make processing of combined module more consistent

Summary:
1. Use stream 0 only for combined module. Previously if combined module was not
processes ThinLTO used the stream for own output. However small changes in input,
could trigger combined module  and shuffle outputs making life of llvm::LTO harder.

2. Always process combined module and write output to stream 0. Processing empty
combined module is cheap and allows llvm::LTO users to avoid implementing processing
which is already done in llvm::LTO.

Subscribers: mehdi_amini, inglorion, eraman, hiraditya

Differential Revision: https://reviews.llvm.org/D41267

llvm-svn: 320905
25 files changed:
lld/test/COFF/thinlto.ll
lld/test/ELF/lto/thinlto.ll
llvm/include/llvm/LTO/LTO.h
llvm/lib/LTO/LTO.cpp
llvm/test/LTO/Resolution/X86/dead-strip-alias.ll
llvm/test/LTO/Resolution/X86/ifunc.ll
llvm/test/LTO/Resolution/X86/linker-redef-thin.ll
llvm/test/LTO/Resolution/X86/linkonce.ll
llvm/test/LTO/Resolution/X86/load-sample-prof-icp.ll
llvm/test/LTO/Resolution/X86/load-sample-prof.ll
llvm/test/LTO/Resolution/X86/mod-asm-used.ll
llvm/test/ThinLTO/X86/deadstrip.ll
llvm/test/ThinLTO/X86/debuginfo-compositetype-import.ll
llvm/test/ThinLTO/X86/distributed_import.ll
llvm/test/ThinLTO/X86/empty-module.ll [new file with mode: 0644]
llvm/test/ThinLTO/X86/funcimport2.ll
llvm/test/ThinLTO/X86/internalize.ll
llvm/test/ThinLTO/X86/module_asm2.ll
llvm/test/ThinLTO/X86/module_asm_glob.ll
llvm/test/ThinLTO/X86/personality-local.ll
llvm/test/ThinLTO/X86/personality.ll
llvm/test/ThinLTO/X86/reference_non_importable.ll
llvm/test/Transforms/FunctionImport/funcimport_var.ll
llvm/test/Transforms/PGOProfile/thinlto_samplepgo_icp2.ll
llvm/test/tools/gold/X86/thinlto.ll