[PATCH] D156715: [CSSPGO] Fix issues with post-link function checksum check

Lei Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 3 12:34:59 PDT 2023


wlei added a comment.

In D156715#4550679 <https://reviews.llvm.org/D156715#4550679>, @hoy wrote:

> How does perf look like after disabling annotating imported functions?

So far from what I tested, there is no perf change if only disabling annotating imported functions. Note that this also disables the profile matching for the  imported functions, so it could cause perf issue, depending on if the imported functions is stale.



================
Comment at: llvm/lib/Transforms/IPO/SampleProfile.cpp:2279
+    const auto *FuncDesc = ProbeManager->getDesc(F);
+    if (FuncDesc && ProbeManager->profileIsHashMismatched(*FuncDesc, FS)) {
       MismatchedFuncHashSamples += Count;
----------------
hoy wrote:
> Can we assert `FuncDesc` to be non-null here? 
As I said in other comments, `FuncDesc` can be null for imported functions, this patch disables the matching for them, we need a new patch to cover this.



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D156715



More information about the llvm-commits mailing list