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

via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 10 20:08:12 PDT 2024


================
@@ -1216,6 +1225,14 @@ class FunctionSamples {
   // all the inline instances and names of call targets.
   void findAllNames(DenseSet<FunctionId> &NameSet) const;
 
+  /// Traverse inlined callsites recursively, and erase call targets in
+  /// BodySamples and callsites in CallsiteSamples with matching canonical
+  /// representation (or do the opposite, if Inverse is true).
----------------
WenleiHe wrote:

What does "do the opposite" mean? removing the ones that does not match the name? that's not what the code is doing. 

Additionally, why do we need both Re and a string? which one is the pattern to match? As an API, I'd expect it to only need one input for patterns to match (either RE, glob, or string). 

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


More information about the llvm-commits mailing list