[SampleFDO] Create a separate flag profile-accurate-for-symsinlist to handle
authorWei Mi <wmi@google.com>
Fri, 27 Sep 2019 22:33:59 +0000 (22:33 +0000)
committerWei Mi <wmi@google.com>
Fri, 27 Sep 2019 22:33:59 +0000 (22:33 +0000)
commitf0c4e70e95d94f1d585058c5ad18098e5924d06d
tree42943fd3f21bb27f444f4bd96e5334375c5a5a26
parentfa6584c5421612782efef089cbd9247b8615f315
[SampleFDO] Create a separate flag profile-accurate-for-symsinlist to handle
profile symbol list.

Currently many existing users using profile-sample-accurate want to reduce
code size as much as possible. Their use cases are different from the scenario
profile symbol list tries to handle -- the major motivation of adding profile
symbol list is to get the major memory/code size saving without introduce
performance regression. So to keep the behavior of profile-sample-accurate
unchanged, we think decoupling these two things and using a new flag to
control the handling of profile symbol list may be better.

When profile-sample-accurate and the new flag profile-accurate-for-symsinlist
are both present, since profile-sample-accurate is a user assertion we let it
have a higher precedence.

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

llvm-svn: 373133
llvm/lib/Transforms/IPO/SampleProfile.cpp
llvm/test/Transforms/SampleProfile/compressed-profile-symbol-list.ll
llvm/test/Transforms/SampleProfile/profile-sample-accurate.ll
llvm/test/Transforms/SampleProfile/uncompressed-profile-symbol-list.ll