]> granicus.if.org Git - llvm/commit
[SampleFDO] Add profile remapping support for profile on-demand loading used
authorWei Mi <wmi@google.com>
Fri, 18 Oct 2019 22:35:20 +0000 (22:35 +0000)
committerWei Mi <wmi@google.com>
Fri, 18 Oct 2019 22:35:20 +0000 (22:35 +0000)
commit762a6a2124f40b16aeeaa511099b766e2df04779
tree080e7a2744489816ab95a92b8d5d250fbdac2f94
parent1e88075ba35378f4b16e470883af29a1123645bd
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@375295 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ProfileData/SampleProfReader.h
lib/ProfileData/SampleProfReader.cpp
lib/Transforms/IPO/SampleProfile.cpp
test/Transforms/SampleProfile/remap.ll
unittests/ProfileData/SampleProfTest.cpp