[llvm] [SampleFDO] Stale profile call-graph matching (PR #92151)

via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 1 16:56:28 PDT 2024


================
@@ -58,6 +59,20 @@ class SampleProfileMatcher {
   StringMap<std::unordered_map<LineLocation, MatchState, LineLocationHash>>
       FuncCallsiteMatchStates;
 
+  struct FuncProfNameMapHash {
+    uint64_t
+    operator()(const std::pair<const Function *, FunctionId> &P) const {
+      return hash_combine(P.first, P.second);
+    }
+  };
+  std::unordered_map<std::pair<const Function *, FunctionId>, bool,
+                     FuncProfNameMapHash>
+      FunctionProfileNameMap;
+
+  FunctionMap *SymbolMap;
----------------
WenleiHe wrote:

Add comment for the containers.

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


More information about the llvm-commits mailing list