1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00
llvm-mirror/test/Verifier/metadata-function-prof.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

16 lines
346 B
LLVM

; RUN: not llvm-as %s -disable-output 2>&1 | FileCheck %s
; CHECK: function declaration may not have a !prof attachment
declare !prof !0 void @f1()
define void @f2() !prof !0 {
unreachable
}
; CHECK: function must have a single !prof attachment
define void @f3() !prof !0 !prof !0 {
unreachable
}
!0 = !{!"function_entry_count", i64 100}