[lld] r320905 - [LTO] Make processing of combined module more consistent

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 15 18:10:01 PST 2017


Author: vitalybuka
Date: Fri Dec 15 18:10:00 2017
New Revision: 320905

URL: http://llvm.org/viewvc/llvm-project?rev=320905&view=rev
Log:
[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

Modified:
    lld/trunk/test/COFF/thinlto.ll
    lld/trunk/test/ELF/lto/thinlto.ll

Modified: lld/trunk/test/COFF/thinlto.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/COFF/thinlto.ll?rev=320905&r1=320904&r2=320905&view=diff
==============================================================================
--- lld/trunk/test/COFF/thinlto.ll (original)
+++ lld/trunk/test/COFF/thinlto.ll Fri Dec 15 18:10:00 2017
@@ -4,7 +4,7 @@
 ; RUN: opt -thinlto-bc -o %T/thinlto/main.obj %s
 ; RUN: opt -thinlto-bc -o %T/thinlto/foo.obj %S/Inputs/lto-dep.ll
 ; RUN: lld-link /lldsavetemps /out:%T/thinlto/main.exe /entry:main /subsystem:console %T/thinlto/main.obj %T/thinlto/foo.obj
-; RUN: llvm-nm %T/thinlto/main.exe.lto.obj | FileCheck %s
+; RUN: llvm-nm %T/thinlto/main.exe1.lto.obj | FileCheck %s
 
 ; CHECK-NOT: U foo
 

Modified: lld/trunk/test/ELF/lto/thinlto.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/lto/thinlto.ll?rev=320905&r1=320904&r2=320905&view=diff
==============================================================================
--- lld/trunk/test/ELF/lto/thinlto.ll (original)
+++ lld/trunk/test/ELF/lto/thinlto.ll Fri Dec 15 18:10:00 2017
@@ -6,14 +6,14 @@
 ; First force single-threaded mode
 ; RUN: rm -f %t.lto.o %t1.lto.o
 ; RUN: ld.lld -save-temps --thinlto-jobs=1 -shared %t.o %t2.o -o %t
-; RUN: llvm-nm %t.lto.o | FileCheck %s --check-prefix=NM1
-; RUN: llvm-nm %t1.lto.o | FileCheck %s --check-prefix=NM2
+; RUN: llvm-nm %t1.lto.o | FileCheck %s --check-prefix=NM1
+; RUN: llvm-nm %t2.lto.o | FileCheck %s --check-prefix=NM2
 
 ; Next force multi-threaded mode
 ; RUN: rm -f %t2.lto.o %t21.lto.o
 ; RUN: ld.lld -save-temps --thinlto-jobs=2 -shared %t.o %t2.o -o %t2
-; RUN: llvm-nm %t2.lto.o | FileCheck %s --check-prefix=NM1
-; RUN: llvm-nm %t21.lto.o | FileCheck %s --check-prefix=NM2
+; RUN: llvm-nm %t21.lto.o | FileCheck %s --check-prefix=NM1
+; RUN: llvm-nm %t22.lto.o | FileCheck %s --check-prefix=NM2
 
 ; NM1: T f
 ; NM1-NOT: U g




More information about the llvm-commits mailing list