]> granicus.if.org Git - llvm/commit
[SampleFDO] Add profile symbol list section to discriminate function being
authorWei Mi <wmi@google.com>
Sat, 31 Aug 2019 02:27:26 +0000 (02:27 +0000)
committerWei Mi <wmi@google.com>
Sat, 31 Aug 2019 02:27:26 +0000 (02:27 +0000)
commit5f1543dfbd7cd9a280a982354bdb030ecd05bea2
treef32b054efc9ae160d2b96893cf555c3737f4167f
parent209c4e345a7f9d68627b969f2cf31da97a5999eb
[SampleFDO] Add profile symbol list section to discriminate function being
cold versus function being newly added.

This is the second half of https://reviews.llvm.org/D66374.

Profile symbol list is the collection of function symbols showing up in
the binary which generates the current profile. It is used to discriminate
function being cold versus function being newly added. Profile symbol list
is only added for profile with ExtBinary format.

During profile use compilation, when profile-sample-accurate is enabled,
a function without profile will be regarded as cold only when it is
contained in that list.

Differential Revision: https://reviews.llvm.org/D66766

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370563 91177308-0d34-0410-b5e6-96231b3b80d8
17 files changed:
include/llvm/ProfileData/SampleProf.h
include/llvm/ProfileData/SampleProfReader.h
include/llvm/ProfileData/SampleProfWriter.h
lib/ProfileData/SampleProf.cpp
lib/ProfileData/SampleProfReader.cpp
lib/ProfileData/SampleProfWriter.cpp
lib/Transforms/IPO/SampleProfile.cpp
test/Transforms/SampleProfile/Inputs/profile-symbol-list.ll [new file with mode: 0644]
test/Transforms/SampleProfile/Inputs/profile-symbol-list.text [new file with mode: 0644]
test/Transforms/SampleProfile/compressed-profile-symbol-list.ll [new file with mode: 0644]
test/Transforms/SampleProfile/uncompressed-profile-symbol-list.ll [new file with mode: 0644]
test/tools/llvm-profdata/Inputs/profile-symbol-list-1.text [new file with mode: 0644]
test/tools/llvm-profdata/Inputs/profile-symbol-list-2.text [new file with mode: 0644]
test/tools/llvm-profdata/Inputs/profile-symbol-list.expected [new file with mode: 0644]
test/tools/llvm-profdata/profile-symbol-list.test [new file with mode: 0644]
tools/llvm-profdata/llvm-profdata.cpp
unittests/ProfileData/SampleProfTest.cpp