[PATCH] D158900: [CSSPGO] Compute checksum mismatch recursively on nested profile

Lei Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 25 17:47:21 PDT 2023


wlei added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/SampleProfile.cpp:2171
 
+void SampleProfileMatcher::computeHashMismatchSamples(
+    const FunctionSamples &FS, uint64_t &MismatchedSamples) {
----------------
wenlei wrote:
> nit: countMismatchedSamples?
done!


================
Comment at: llvm/lib/Transforms/IPO/SampleProfile.cpp:2202
+      }
+      computeHashMismatchSamples(FS, MismatchedFuncHashSamples);
     }
----------------
wenlei wrote:
> Given `MismatchedFuncHashSamples` is a member of `SampleProfileMatcher`, we probably don't need to pass it all the way through the recursive calls? 
> 
> Same for other statistics that is a member of `SampleProfileMatcher`. 
Ah, good catch, I was designing to use the variable outside of the function. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D158900



More information about the llvm-commits mailing list