mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-27 14:45:24 +00:00
e26c421c66
Summary: For SamplePGO, the profile may contain cross-module inline stacks. As we need to make sure the profile annotation happens when all the hot inline stacks are expanded, we need to pass this info to the module importer so that it can import proper functions if necessary. This patch implemented this feature by emitting cross-module targets as part of function entry metadata. In the module-summary phase, the metadata is used to build call edges that points to functions need to be imported. Reviewers: mehdi_amini, tejohnson Reviewed By: tejohnson Subscribers: davidxl, llvm-commits Differential Revision: https://reviews.llvm.org/D30053 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296498 91177308-0d34-0410-b5e6-96231b3b80d8
36 lines
883 B
LLVM
36 lines
883 B
LLVM
; RUN: not llvm-as < %s -o /dev/null 2>&1 | FileCheck %s
|
|
|
|
define i32 @bad1() !prof !0 {
|
|
ret i32 0
|
|
}
|
|
|
|
!0 = !{i32 123, i32 3}
|
|
; CHECK: assembly parsed, but does not verify as correct!
|
|
; CHECK-NEXT: expected string with name of the !prof annotation
|
|
; CHECK-NEXT: !0 = !{i32 123, i32 3}
|
|
|
|
define i32 @bad2() !prof !1 {
|
|
ret i32 0
|
|
}
|
|
|
|
!1 = !{!"function_entry_count"}
|
|
; CHECK-NEXT: !prof annotations should have no less than 2 operands
|
|
; CHECK-NEXT: !1 = !{!"function_entry_count"}
|
|
|
|
|
|
define i32 @bad3() !prof !2 {
|
|
ret i32 0
|
|
}
|
|
|
|
!2 = !{!"some_other_count", i64 200}
|
|
; CHECK-NEXT: first operand should be 'function_entry_count'
|
|
; CHECK-NEXT: !2 = !{!"some_other_count", i64 200}
|
|
|
|
define i32 @bad4() !prof !3 {
|
|
ret i32 0
|
|
}
|
|
|
|
!3 = !{!"function_entry_count", !"string"}
|
|
; CHECK-NEXT: expected integer argument to function_entry_count
|
|
; CHECK-NEXT: !3 = !{!"function_entry_count", !"string"}
|