Changeset View
Changeset View
Standalone View
Standalone View
test/ThinLTO/X86/lazyload_metadata.ll
; Do setup work for all below tests: generate bitcode and combined index | ; Do setup work for all below tests: generate bitcode and combined index | ||||
; RUN: opt -module-summary %s -o %t.bc -bitcode-mdindex-threshold=0 | ; RUN: opt -module-summary %s -o %t.bc -bitcode-mdindex-threshold=0 | ||||
; RUN: opt -module-summary %p/Inputs/lazyload_metadata.ll -o %t2.bc -bitcode-mdindex-threshold=0 | ; RUN: opt -module-summary %p/Inputs/lazyload_metadata.ll -o %t2.bc -bitcode-mdindex-threshold=0 | ||||
; RUN: llvm-lto -thinlto-action=thinlink -o %t3.bc %t.bc %t2.bc | ; RUN: llvm-lto -thinlto-action=thinlink -o %t3.bc %t.bc %t2.bc | ||||
; REQUIRES: asserts | ; REQUIRES: asserts | ||||
; Check that importing @globalfunc1 does not trigger loading all the global | ; Check that importing @globalfunc1 does not trigger loading all the global | ||||
; metadata for @globalfunc2 and @globalfunc3 | ; metadata for @globalfunc2 and @globalfunc3 | ||||
; RUN: llvm-lto -thinlto-action=import %t2.bc -thinlto-index=%t3.bc \ | ; RUN: llvm-lto -thinlto-action=import %t2.bc -thinlto-index=%t3.bc \ | ||||
; RUN: -o /dev/null -stats \ | ; RUN: -o /dev/null -stats \ | ||||
; RUN: 2>&1 | FileCheck %s -check-prefix=LAZY | ; RUN: 2>&1 | FileCheck %s -check-prefix=LAZY | ||||
; LAZY: 49 bitcode-reader - Number of Metadata records loaded | ; LAZY: 51 bitcode-reader - Number of Metadata records loaded | ||||
; LAZY: 2 bitcode-reader - Number of MDStrings loaded | ; LAZY: 2 bitcode-reader - Number of MDStrings loaded | ||||
; RUN: llvm-lto -thinlto-action=import %t2.bc -thinlto-index=%t3.bc \ | ; RUN: llvm-lto -thinlto-action=import %t2.bc -thinlto-index=%t3.bc \ | ||||
; RUN: -o /dev/null -disable-ondemand-mds-loading -stats \ | ; RUN: -o /dev/null -disable-ondemand-mds-loading -stats \ | ||||
; RUN: 2>&1 | FileCheck %s -check-prefix=NOTLAZY | ; RUN: 2>&1 | FileCheck %s -check-prefix=NOTLAZY | ||||
; NOTLAZY: 58 bitcode-reader - Number of Metadata records loaded | ; NOTLAZY: 60 bitcode-reader - Number of Metadata records loaded | ||||
mehdi_amini: I don't understand where this is coming from? | |||||
Not Done ReplyInline ActionsI assume, because of the extra fixed metadata kind. eugenis: I assume, because of the extra fixed metadata kind. | |||||
; NOTLAZY: 7 bitcode-reader - Number of MDStrings loaded | ; NOTLAZY: 7 bitcode-reader - Number of MDStrings loaded | ||||
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" | target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" | ||||
target triple = "x86_64-apple-macosx10.11.0" | target triple = "x86_64-apple-macosx10.11.0" | ||||
define void @globalfunc1(i32 %arg) { | define void @globalfunc1(i32 %arg) { | ||||
%x = call i1 @llvm.type.test(i8* undef, metadata !"typeid1") | %x = call i1 @llvm.type.test(i8* undef, metadata !"typeid1") | ||||
Show All 22 Lines | |||||
!1 = !{!2, !3, !4, !5, !6, !7, !8, !9} | !1 = !{!2, !3, !4, !5, !6, !7, !8, !9} | ||||
!2 = !{!"Hello World"} | !2 = !{!"Hello World"} | ||||
!3 = !{!"3"} | !3 = !{!"3"} | ||||
!4 = !{!"4"} | !4 = !{!"4"} | ||||
!5 = !{!"5"} | !5 = !{!"5"} | ||||
!6 = !{!9} | !6 = !{!9} | ||||
!7 = !{!"7"} | !7 = !{!"7"} | ||||
!8 = !{!"8"} | !8 = !{!"8"} | ||||
!9 = !{!6} | !9 = !{!6} | ||||
No newline at end of file |
I don't understand where this is coming from?