[PATCH] D67561: [SampleFDO] minimize performance impact when profile-sample-accurate is enabled
Wei Mi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 15 21:54:06 PDT 2019
wmi marked an inline comment as done.
wmi added a comment.
In D67561#1670630 <https://reviews.llvm.org/D67561#1670630>, @davidxl wrote:
> If we use NameTable, is ProfileSymbolList still needed? I assume NameTable is a superset ?
NameTable is not a superset. ProfileSymbolList contains all the function symbols in the sampled binary. NameTable contains all the symbols in the profile including outline copy, inline instance and call targets. The size of NameTable is usually < 1/10 of the size of ProfileSymbolList -- a lot of function symbols are cold and won't show up in the profile.
================
Comment at: lib/Transforms/IPO/SampleProfile.cpp:1791
+ StringRef CanonName = FunctionSamples::getCanonicalFnName(F);
+ for (unsigned i = 0; i < NamesInProfile->size(); i++) {
+ if ((*NamesInProfile)[i] == CanonName) {
----------------
davidxl wrote:
> This is a linear search. What is the compile time impact?
I will evaluate it and get back.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67561/new/
https://reviews.llvm.org/D67561
More information about the llvm-commits
mailing list