[llvm] [BOLT] Record return profile as call to continuation fallthrough (PR #109486)

Amir Ayupov via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 30 10:16:48 PDT 2024


================
@@ -804,9 +804,13 @@ bool DataAggregator::doBranch(uint64_t From, uint64_t To, uint64_t Count,
   };
 
   BinaryFunction *FromFunc = handleAddress(From, /*IsFrom=*/true);
-  // Ignore returns.
-  if (IsReturn)
-    return true;
+  // Record returns as call->call continuation fall-through.
+  if (IsReturn) {
----------------
aaupov wrote:

Yes, it actually does and it will result in double-counting in perf data. 

I'm thinking whether I should restrict new handling to pre-aggregated profile only, or to drop the heuristic used for perf data. I'll do perf experiments and look at resulting profile continuity to decide. 

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


More information about the llvm-commits mailing list