diff options
author | Dehao Chen <dehao@google.com> | 2017-10-01 05:24:51 +0000 |
---|---|---|
committer | Dehao Chen <dehao@google.com> | 2017-10-01 05:24:51 +0000 |
commit | d26dae0d34cf13daab871fcffa513c6dd96a15bb (patch) | |
tree | ebab447ed20bf788df4b4b11c3fd81c859b4d595 /llvm/test/Transforms | |
parent | 0b9fbf97f0a5d5a4f6bd7d09aa1ec2fadae157bf (diff) | |
download | bcm5719-llvm-d26dae0d34cf13daab871fcffa513c6dd96a15bb.tar.gz bcm5719-llvm-d26dae0d34cf13daab871fcffa513c6dd96a15bb.zip |
Separate the logic when handling indirect calls in SamplePGO ThinLTO compile phase and other phases.
Summary: In SamplePGO ThinLTO compile phase, we will not invoke ICP as it may introduce confusion to the 2nd annotation. This patch extracted that logic and makes it clearer before profile annotation. In the mean time, we need to make function importing process both inlined callsites as well as not promoted indirect callsites.
Reviewers: tejohnson
Reviewed By: tejohnson
Subscribers: sanjoy, mehdi_amini, llvm-commits, inglorion
Differential Revision: https://reviews.llvm.org/D38094
llvm-svn: 314619
Diffstat (limited to 'llvm/test/Transforms')
-rw-r--r-- | llvm/test/Transforms/SampleProfile/Inputs/import.prof | 2 | ||||
-rw-r--r-- | llvm/test/Transforms/SampleProfile/import.ll | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/llvm/test/Transforms/SampleProfile/Inputs/import.prof b/llvm/test/Transforms/SampleProfile/Inputs/import.prof index aae072ac191..e09ee6bf060 100644 --- a/llvm/test/Transforms/SampleProfile/Inputs/import.prof +++ b/llvm/test/Transforms/SampleProfile/Inputs/import.prof @@ -5,4 +5,4 @@ test:10000:0 4: foo1:1000 1: 1000 4: foo2:1000 - 1: 1000 + 1: 1000 foo3:1000 diff --git a/llvm/test/Transforms/SampleProfile/import.ll b/llvm/test/Transforms/SampleProfile/import.ll index ad9c2d55aa9..8cc2338a048 100644 --- a/llvm/test/Transforms/SampleProfile/import.ll +++ b/llvm/test/Transforms/SampleProfile/import.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -sample-profile -sample-profile-file=%S/Inputs/import.prof -S | FileCheck %s +; RUN: opt < %s -passes='thinlto-pre-link<O2>' -pgo-kind=new-pm-pgo-sample-use-pipeline -profile-file=%S/Inputs/import.prof -S | FileCheck %s ; Tests whether the functions in the inline stack are added to the ; function_entry_count metadata. @@ -15,9 +15,9 @@ define void @test(void ()*) !dbg !7 { ret void } -; GUIDs of foo, bar, foo1 and foo2 should be included in the metadata to make -; sure hot inline stacks are imported. -; CHECK: !{!"function_entry_count", i64 1, i64 2494702099028631698, i64 6699318081062747564, i64 7682762345278052905, i64 -2012135647395072713} +; GUIDs of foo, bar, foo1, foo2 and foo3 should be included in the metadata to +; make sure hot inline stacks are imported. +; CHECK: !{!"function_entry_count", i64 1, i64 2494702099028631698, i64 6699318081062747564, i64 7682762345278052905, i64 -7908226060800700466, i64 -2012135647395072713} !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!8, !9} |