[llvm-branch-commits] [llvm] [BOLT] Match blocks with calls as anchors (PR #96596)

Amir Ayupov via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Jul 3 11:03:40 PDT 2024


================
@@ -220,17 +245,27 @@ class StaleMatcher {
     return BestBlock;
   }
 
-  /// Returns true if the two basic blocks (in the binary and in the profile)
-  /// corresponding to the given hashes are matched to each other with a high
-  /// confidence.
-  static bool isHighConfidenceMatch(BlendedBlockHash Hash1,
-                                    BlendedBlockHash Hash2) {
-    return Hash1.InstrHash == Hash2.InstrHash;
+  // Uses CallHash to find the most similar block for a given hash.
+  const FlowBlock *matchWithCalls(BlendedBlockHash &BlendedHash,
----------------
aaupov wrote:

ditto

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


More information about the llvm-branch-commits mailing list