[PATCH] D68047: [SampleFDO] Create a separate flag ProfileAccurateForProfSymList for handling profile symbol list

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 27 11:31:07 PDT 2019


davidxl added inline comments.


================
Comment at: lib/Transforms/IPO/SampleProfile.cpp:502
+  if (ProfAccForSymsInList)
     return !PSI->isColdCount(CallsiteTotalSamples);
   else
----------------
Add an assert here that profile-sample-accurate is not on?


================
Comment at: lib/Transforms/IPO/SampleProfile.cpp:1682
+  ProfAccForSymsInList =
+      ProfileAccurateForSymsInList && PSL && !ProfileSampleAccurate;
+  if (ProfAccForSymsInList) {
----------------
Add a comment that while profile-sample-accurate is on, ignore symbol list.


================
Comment at: lib/Transforms/IPO/SampleProfile.cpp:1786
+    initialEntryCount = 0;
+    // ProfileAccurateForSymsInList can be overriden by ProfileSampleAccurate.
+    ProfAccForSymsInList = false;
----------------
Improve the comment to be: " profile-sample-accurate is a user assertion which has a higher precedence than symbol list. When profile-sample-accurate is on, ignore symbol list.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68047/new/

https://reviews.llvm.org/D68047





More information about the llvm-commits mailing list