[llvm-branch-commits] [llvm] [BOLT] Function matching with function calls as anchors (PR #96596)

Amir Ayupov via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Jun 25 15:53:14 PDT 2024


================
@@ -415,11 +495,20 @@ Error YAMLProfileReader::readProfile(BinaryContext &BC) {
     if (!YamlBF.Used && BF && !ProfiledFunctions.count(BF))
       matchProfileToFunction(YamlBF, *BF);
 
+  uint64_t MatchedWithCallsAsAnchors = 0;
+  if (opts::MatchWithCallsAsAnchors)
+    matchWithCallsAsAnchors(BC, MatchedWithCallsAsAnchors);
----------------
aaupov wrote:

This new matching needs to be inside `inferStaleProfile` as we discussed, conceptually sandwiched between strict and loose block hash matching. Logistically it happen in this vicinity:
https://github.com/llvm/llvm-project/blob/e214ed9d7060f6caa0c1bb756edb62643f23aa5b/bolt/lib/Profile/StaleProfileMatching.cpp#L439-L440

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


More information about the llvm-branch-commits mailing list