1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00
llvm-mirror/test/Verifier/function-metadata-bad.ll
Dehao Chen 356ba78c03 Add function importing info from samplepgo profile to the module summary.
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

llvm-svn: 296498
2017-02-28 18:09:44 +00:00

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"}