1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-02-01 05:01:59 +01:00
llvm-mirror/test/tools/gold/X86/thinlto-emit-llvm.ll
Hongtao Yu 92fcb93e7b [ThinLTO][gold] Fix filenaming scheme for tasks.
The gold LTO plugin uses a set of hooks to implements emit-llvm and capture intermediate file generated during LTO. The hooks are called by each lto backend thread with a taskID as argument to differentiate between threads and tasks. Currently, all threads are overwriting the same file which results into only the intermediate output of the last backend thread to be preserved. This diff encodes the taskID into the filename.

Reviewed By: tejohnson, wenlei

Differential Revision: https://reviews.llvm.org/D96173
2021-02-12 09:40:08 -08:00

18 lines
688 B
LLVM

; RUN: llvm-as %p/Inputs/emit-llvm.foo.ll -o %t.foo.bc
; RUN: llvm-as %p/Inputs/emit-llvm.bar.ll -o %t.bar.bc
; RUN: %gold -plugin %llvmshlibdir/LLVMgold%shlibext --shared -plugin-opt thinlto -plugin-opt emit-llvm -m elf_x86_64 %t.foo.bc %t.bar.bc -o %t.bc
; RUN: llvm-dis %t.bc1 -o - | FileCheck --check-prefix=CHECK-BC1 %s
; RUN: llvm-dis %t.bc2 -o - | FileCheck --check-prefix=CHECK-BC2 %s
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
; CHECK-BC1: define dso_local i32 @_Z3foov()
define dso_local i32 @_Z3foov() {
ret i32 0
}
; CHECK-BC2: define dso_local i32 @_Z3barv()
define dso_local i32 @_Z3barv() {
ret i32 0
}