[llvm] [BOLT]Improve profile quality reporting (PR #130810)

Amir Ayupov via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 7 11:33:15 PDT 2025


================
@@ -199,60 +202,61 @@ void printCallGraphFlowConservationStats(
         TotalFlowMap.CallGraphIncomingFlows;
 
     // Only consider functions that are not a program entry.
-    if (CallGraphIncomingFlows.find(FunctionNum) !=
+    if (CallGraphIncomingFlows.find(FunctionNum) ==
         CallGraphIncomingFlows.end()) {
-      uint64_t EntryInflow = 0;
-      uint64_t EntryOutflow = 0;
-      uint32_t NumConsideredEntryBlocks = 0;
-
-      Function->forEachEntryPoint([&](uint64_t Offset, const MCSymbol *Label) {
-        const BinaryBasicBlock *EntryBB =
-            Function->getBasicBlockAtOffset(Offset);
-        if (!EntryBB || EntryBB->succ_size() == 0)
-          return true;
-        NumConsideredEntryBlocks++;
-        EntryInflow += IncomingFlows[EntryBB->getLayoutIndex()];
-        EntryOutflow += OutgoingFlows[EntryBB->getLayoutIndex()];
+      CallGraphGaps.push_back(0.0);
+      continue;
+    }
+
+    uint64_t EntryInflow = 0;
----------------
aaupov wrote:

This chunk is just changing the indent, right?

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


More information about the llvm-commits mailing list