diff options
author | Dehao Chen <dehao@google.com> | 2017-02-28 18:09:44 +0000 |
---|---|---|
committer | Dehao Chen <dehao@google.com> | 2017-02-28 18:09:44 +0000 |
commit | e26c421c66edc0e8f1f7e42f4f450f3b81f6e223 (patch) | |
tree | 9677ffb525b0ae191eacf4c2c88f4e25934eb137 /test/Verifier | |
parent | f563b7840e0cc6ce36d34a846e069e8f0f3a89f4 (diff) |
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
Diffstat (limited to 'test/Verifier')
-rw-r--r-- | test/Verifier/function-metadata-bad.ll | 2 | ||||
-rw-r--r-- | test/Verifier/metadata-function-prof.ll | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/test/Verifier/function-metadata-bad.ll b/test/Verifier/function-metadata-bad.ll index 9e7ba225408e..b3bd3c27c6d4 100644 --- a/test/Verifier/function-metadata-bad.ll +++ b/test/Verifier/function-metadata-bad.ll @@ -14,7 +14,7 @@ define i32 @bad2() !prof !1 { } !1 = !{!"function_entry_count"} -; CHECK-NEXT: !prof annotations should have exactly 2 operands +; CHECK-NEXT: !prof annotations should have no less than 2 operands ; CHECK-NEXT: !1 = !{!"function_entry_count"} diff --git a/test/Verifier/metadata-function-prof.ll b/test/Verifier/metadata-function-prof.ll index d84a7fe54402..70548b1fa41f 100644 --- a/test/Verifier/metadata-function-prof.ll +++ b/test/Verifier/metadata-function-prof.ll @@ -12,4 +12,4 @@ define void @f3() !prof !0 !prof !0 { unreachable } -!0 = !{} +!0 = !{!"function_entry_count", i64 100} |