[all-commits] [llvm/llvm-project] 7e33be: [BOLT] Report flow conservation scores (#127954)

ShatianWang via All-commits all-commits at lists.llvm.org
Fri Feb 28 08:07:17 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7e33bebe7c8c1258248567670209e6756a6cf77a
      https://github.com/llvm/llvm-project/commit/7e33bebe7c8c1258248567670209e6756a6cf77a
  Author: ShatianWang <38512325+ShatianWang at users.noreply.github.com>
  Date:   2025-02-28 (Fri, 28 Feb 2025)

  Changed paths:
    R bolt/include/bolt/Passes/ContinuityStats.h
    A bolt/include/bolt/Passes/ProfileQualityStats.h
    M bolt/lib/Passes/CMakeLists.txt
    R bolt/lib/Passes/ContinuityStats.cpp
    A bolt/lib/Passes/ProfileQualityStats.cpp
    M bolt/lib/Rewrite/BinaryPassManager.cpp
    R bolt/test/X86/cfg-discontinuity-reporting.test
    A bolt/test/X86/profile-quality-reporting.test

  Log Message:
  -----------
  [BOLT] Report flow conservation scores (#127954)

Add two additional profile quality stats for CG (call graph) and CFG
(control flow graph) flow conservations besides the CFG discontinuity
stats introduced in #109683. The two new stats quantify how different
"in-flow" is from "out-flow" in the following cases where they should be
equal. The smaller the reported stats, the better the flow conservations
are.

CG flow conservation: for each function that is not a program entry, the
number of times the function is called according to CG ("in-flow")
should be equal to the number of times the transition from an entry
basic block of the function to another basic block within the function
is recorded ("out-flow").

CFG flow conservation: for each basic block that is not a function entry
or exit, the number of times the transition into this basic block from
another basic block within the function is recorded ("in-flow") should
be equal to the number of times the transition from this basic block to
another basic block within the function is recorded ("out-flow").

Use `-v=1` for more detailed bucketed stats, and use `-v=2` to dump
functions / basic blocks with bad flow conservations.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list