[llvm-branch-commits] [llvm] [BOLT] Hash-based function matching (PR #95821)

Amir Ayupov via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sat Jun 22 21:20:11 PDT 2024


================
@@ -439,6 +482,11 @@ Error YAMLProfileReader::readProfile(BinaryContext &BC) {
 
   BC.setNumUnusedProfiledObjects(NumUnused);
 
+  if (opts::Lite)
+    for (BinaryFunction *BF : BC.getAllBinaryFunctions())
+      if (ProfiledFunctions.find(BF) == ProfiledFunctions.end())
----------------
aaupov wrote:

At this point we're supposed to have attached the profile to BF:
```suggestion
      if (!BF->hasProfile())
```

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


More information about the llvm-branch-commits mailing list