mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
4c1d21ec8c
Summary: SampleProfileLoader pass may be invoked twice by LTO. The 2nd pass should not append more summary info as it is already preset by the 1st pass. Reviewers: eraman, davidxl Subscribers: mehdi_amini, llvm-commits Differential Revision: https://reviews.llvm.org/D27733 llvm-svn: 289725
16 lines
633 B
LLVM
16 lines
633 B
LLVM
; Test that we annotate entire program's summary to IR.
|
|
; RUN: opt < %s -sample-profile -sample-profile-file=%S/Inputs/summary.prof -S | FileCheck %s
|
|
; RUN: opt < %s -sample-profile -sample-profile-file=%S/Inputs/summary.prof -S | opt -sample-profile -sample-profile-file=%S/Inputs/summary.prof -S | FileCheck %s
|
|
|
|
define i32 @bar() #0 !dbg !1 {
|
|
entry:
|
|
ret i32 1, !dbg !2
|
|
}
|
|
|
|
; CHECK-DAG: {{![0-9]+}} = !{i32 1, !"ProfileSummary", {{![0-9]+}}}
|
|
; CHECK-DAG: {{![0-9]+}} = !{!"NumFunctions", i64 2}
|
|
; CHECK-DAG: {{![0-9]+}} = !{!"MaxFunctionCount", i64 3}
|
|
|
|
!1 = distinct !DISubprogram(name: "bar")
|
|
!2 = !DILocation(line: 2, scope: !2)
|