[PATCH] D67561: [SampleFDO] minimize performance impact when profile-sample-accurate is enabled

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 15 11:18:19 PDT 2019


davidxl added a comment.
Herald added a subscriber: dmgreen.

If we use NameTable, is ProfileSymbolList still needed? I assume NameTable is a superset ?



================
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) {
----------------
This is a linear search. What is the compile time impact?


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