[llvm] [Sample Profile] Expand functionality of llvm-profdata function filter (PR #101615)

via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 2 11:33:04 PDT 2024


================
@@ -1216,6 +1225,13 @@ class FunctionSamples {
   // all the inline instances and names of call targets.
   void findAllNames(DenseSet<FunctionId> &NameSet) const;
 
+  /// Traverse inlined callsites recursively, and erase those with matching
+  /// canonical representation (or do the opposite, if EraseMatch is false).
+  /// Returns total number of samples removed.
+  uint64_t eraseInlinedCallsites(const llvm::Regex &Re,
----------------
WenleiHe wrote:

nit: APIs for FunctionSamples use remove instead of erase (removeTotalSamples, removeCalledTargetAndBodySample, removeAllCallsiteSamples, etc.), suggest to be consistent. 

https://github.com/llvm/llvm-project/pull/101615


More information about the llvm-commits mailing list