1; Test that LTO pipeline loads profile. 2; 3; RUN: opt < %s -o %t.bc 4 5; RUN: llvm-lto2 run -o %t.out %t.bc -save-temps \ 6; RUN: -r %t.bc,foo,px -r %t.bc,bar,x \ 7; RUN: -lto-sample-profile-file=%S/Inputs/load-sample-prof.prof 8; RUN: llvm-dis %t.out.0.4.opt.bc -o - | FileCheck %s 9 10; Make sure profile information is attached. 11; CHECK: !prof 12 13target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" 14target triple = "x86_64-unknown-linux-gnu" 15 16define void @foo() #0 !dbg !7 { 17entry: 18 tail call void @bar(), !dbg !10 19 ret void, !dbg !11 20} 21 22declare void @bar() local_unnamed_addr 23 24attributes #0 = {"local_unnamed_addr" "use-sample-profile"} 25 26!llvm.dbg.cu = !{!0} 27!llvm.module.flags = !{!3, !4, !5} 28!llvm.ident = !{!6} 29 30!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 6.0.0 ", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2) 31!1 = !DIFile(filename: "test.c", directory: "/tmp") 32!2 = !{} 33!3 = !{i32 2, !"Dwarf Version", i32 4} 34!4 = !{i32 2, !"Debug Info Version", i32 3} 35!5 = !{i32 1, !"wchar_size", i32 4} 36!6 = !{!"clang version 6.0.0 "} 37!7 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 3, type: !8, isLocal: false, isDefinition: true, scopeLine: 3, isOptimized: true, unit: !0, retainedNodes: !2) 38!8 = !DISubroutineType(types: !9) 39!9 = !{null} 40!10 = !DILocation(line: 4, column: 5, scope: !7) 41!11 = !DILocation(line: 5, column: 1, scope: !7) 42