================
@@ -682,37 +561,22 @@ matchBlocks(BinaryContext &BC, const 
yaml::bolt::BinaryFunctionProfile &YamlBF,
                         << "\n");
       continue;
     }
-    addMatchedBlock({MatchedBlock, Method}, YamlBF, YamlBB);
-  }
-
-  for (const auto &[YamlBBIdx, FlowBlockProfile] : MatchedBlocks) {
-    const auto &[MatchedBlock, YamlBB] = FlowBlockProfile;
-    StaleMatcher::MatchMethod Method = MatchedFlowBlocks.lookup(MatchedBlock);
+    MatchedBlocks[YamlBB.Index] = {MatchedBlock, 1};
     BlendedBlockHash BinHash = BlendedHashes[MatchedBlock->Index - 1];
-    LLVM_DEBUG(dbgs() << "Matched yaml block (bid = " << YamlBBIdx << ")"
-                      << " with hash " << Twine::utohexstr(YamlBB->Hash)
+    LLVM_DEBUG(dbgs() << "Matched yaml block (bid = " << YamlBB.Index << ")"
+                      << " with hash " << Twine::utohexstr(YamlBB.Hash)
                       << " to BB (index = " << MatchedBlock->Index - 1 << ")"
                       << " with hash " << Twine::utohexstr(BinHash.combine())
                       << "\n");
     (void)BinHash;
-    uint64_t ExecCount = YamlBB->ExecCount;
+    uint64_t ExecCount = YamlBB.ExecCount;
----------------
maksfb wrote:

```suggestion
    const uint64_t ExecCount = YamlBB.ExecCount;
```

https://github.com/llvm/llvm-project/pull/100446
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to