1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00
llvm-mirror/test/ThinLTO/X86/autoupgrade.ll
Teresa Johnson bb5571c7df [ThinLTO] Add string saver onto index for value names
Summary:
Adds a string saver to the ModuleSummaryIndex so it can store value
names in the case of adding a ValueInfo for a GUID when we don't
have the name stored in a Module string table. This is motivated
by the upcoming summary parser patch, where we will read value names
from the summary entry and want to store them, even when a Module
is not available.

Currently this allows us to store the name in the legacy bitcode case,
and I have added a test to show that.

Reviewers: pcc, dexonsmith

Subscribers: mehdi_amini, inglorion, eraman, steven_wu, llvm-commits

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

llvm-svn: 335570
2018-06-26 02:29:08 +00:00

32 lines
1.1 KiB
LLVM

; Verify that auto-upgrading intrinsics works with Lazy loaded bitcode
; Do setup work for all below tests: generate bitcode and combined index
; RUN: opt -module-summary %s -o %t.bc
; RUN: llvm-lto -thinlto-action=thinlink -o %t3.bc %t.bc %p/Inputs/autoupgrade.bc
; We can't use llvm-dis here, because it would do the autoupgrade itself.
; RUN: llvm-link -summary-index=%t3.bc \
; RUN: -import=globalfunc1:%p/Inputs/autoupgrade.bc %t.bc \
; RUN: | llvm-bcanalyzer -dump | FileCheck %s
; CHECK: <STRTAB_BLOCK
; CHECK-NEXT: blob data = 'mainglobalfunc1llvm.invariant.start.p0i8{{.*}}'
; Check that the summary is able to print the names despite the lack of
; string table in the legacy bitcode.
; RUN: llvm-dis %p/Inputs/autoupgrade.bc -o - \
; RUN: | FileCheck %s --check-prefix=SUMMARYNAMES
; SUMMARYNAMES: ^2 = gv: (name: "globalfunc2",
; SUMMARYNAMES: ^3 = gv: (name: "globalfunc1"
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.11.0"
define i32 @main() #0 {
entry:
call void (...) @globalfunc1()
ret i32 0
}
declare void @globalfunc1(...) #1