[llvm] [SampleFDO] Stale profile renaming matching (PR #92151)

Lei Wang via llvm-commits llvm-commits at lists.llvm.org
Mon May 20 12:24:25 PDT 2024


================
@@ -58,6 +60,20 @@ class SampleProfileMatcher {
   StringMap<std::unordered_map<LineLocation, MatchState, LineLocationHash>>
       FuncCallsiteMatchStates;
 
+  struct RenameDecisionCacheHash {
+    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,
+                     RenameDecisionCacheHash>
+      RenameDecisionCache;
----------------
wlei-llvm wrote:

Yes :facepalm

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


More information about the llvm-commits mailing list