diff options
author | Wei Mi <wmi@google.com> | 2019-10-18 22:35:20 +0000 |
---|---|---|
committer | Wei Mi <wmi@google.com> | 2019-10-18 22:35:20 +0000 |
commit | 8c8ec1f6868bd0f96801fabc55ea395d9d171f06 (patch) | |
tree | 18cc0e4b5b96cbde82722bda7f1f8bd5c4c25208 /llvm/test/Transforms/SampleProfile | |
parent | 06a2beae92f5d2adcd0143a6798918418c2ea325 (diff) | |
download | bcm5719-llvm-8c8ec1f6868bd0f96801fabc55ea395d9d171f06.tar.gz bcm5719-llvm-8c8ec1f6868bd0f96801fabc55ea395d9d171f06.zip |
[SampleFDO] Add profile remapping support for profile on-demand loading used
by ExtBinary format profile
Profile on-demand loading was added for ExtBinary format profile in rL374233,
but currently profile on-demand loading doesn't work well with profile
remapping. The patch adds the support.
Suppose a function in the current module has outline instance in the profile.
The function name in the module is different from the name of the outline
instance, but remapper knows the two names are equal. When loading profile
on-demand, the outline instance has to be loaded with remapper's help.
At the same time SampleProfileReaderItaniumRemapper is changed from a proxy
of SampleProfileReader to a helper member in SampleProfileReader.
Differential Revision: https://reviews.llvm.org/D68901
llvm-svn: 375295
Diffstat (limited to 'llvm/test/Transforms/SampleProfile')
-rw-r--r-- | llvm/test/Transforms/SampleProfile/remap.ll | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/test/Transforms/SampleProfile/remap.ll b/llvm/test/Transforms/SampleProfile/remap.ll index 206962a3bef..af37ddae151 100644 --- a/llvm/test/Transforms/SampleProfile/remap.ll +++ b/llvm/test/Transforms/SampleProfile/remap.ll @@ -1,5 +1,9 @@ ; RUN: opt %s -passes=sample-profile -sample-profile-file=%S/Inputs/remap.prof -sample-profile-remapping-file=%S/Inputs/remap.map | opt -analyze -branch-prob | FileCheck %s - +; +; Check whether profile remapping work with loading profile on demand used by extbinary format profile. +; RUN: llvm-profdata merge -sample -extbinary %S/Inputs/remap.prof -o %t.extbinary.afdo +; RUN: opt %s -passes=sample-profile -sample-profile-file=%S/Inputs/remap.prof -sample-profile-remapping-file=%S/Inputs/remap.map | opt -analyze -branch-prob | FileCheck %s +; ; Reduced from branch.ll declare i1 @foo() |