[PATCH] D45377: [SampleFDO] Don't let inliner treat warm callsite with inline instance in the profile as cold

Dehao Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 30 18:41:31 PDT 2018


danielcdh added inline comments.


================
Comment at: lib/Transforms/IPO/SampleProfile.cpp:368
+  uint64_t CallsiteTotalSamples = CallsiteFS->getTotalSamples();
+  if (PSI && PSI->isHotCount(CallsiteTotalSamples))
+    return true;
----------------
In what situations will PSI be nullptr? If not, then please assert it instead.

Also, I think this will overwrite the later (PercentSamples >= SampleProfileHotThreshold) heuristic, and we should remove that flag.


Repository:
  rL LLVM

https://reviews.llvm.org/D45377





More information about the llvm-commits mailing list