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

via llvm-commits llvm-commits at lists.llvm.org
Fri May 17 21:16:59 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;
----------------
WenleiHe wrote:

is this the linter suggest format/style? 

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


More information about the llvm-commits mailing list