llvm/test/Verifier/metadata-function-prof.ll
Dehao Chen e26c421c66 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296498 91177308-0d34-0410-b5e6-96231b3b80d8
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}