[all-commits] [llvm/llvm-project] 9ca8db: [SHT_LLVM_BB_ADDR_MAP] Adds pretty printing of BFI...

Micah Weston via All-commits all-commits at lists.llvm.org
Tue Feb 27 11:13:12 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9ca8db352d22444feabd859380252f13826a8aff
      https://github.com/llvm/llvm-project/commit/9ca8db352d22444feabd859380252f13826a8aff
  Author: Micah Weston <micahsweston at gmail.com>
  Date:   2024-02-27 (Tue, 27 Feb 2024)

  Changed paths:
    M llvm/docs/CommandGuide/llvm-objdump.rst
    M llvm/docs/CommandGuide/llvm-readobj.rst
    M llvm/include/llvm/Analysis/BlockFrequencyInfoImpl.h
    M llvm/include/llvm/Support/BlockFrequency.h
    M llvm/lib/Analysis/BlockFrequencyInfo.cpp
    M llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp
    M llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp
    M llvm/lib/Support/BlockFrequency.cpp
    M llvm/test/tools/llvm-objdump/X86/elf-pgoanalysismap.yaml
    M llvm/test/tools/llvm-readobj/ELF/bb-addr-map-pgo-analysis-map.test
    M llvm/tools/llvm-objdump/ObjdumpOpts.td
    M llvm/tools/llvm-objdump/llvm-objdump.cpp
    M llvm/tools/llvm-readobj/ELFDumper.cpp
    M llvm/tools/llvm-readobj/ObjDumper.h
    M llvm/tools/llvm-readobj/Opts.td
    M llvm/tools/llvm-readobj/llvm-readobj.cpp

  Log Message:
  -----------
  [SHT_LLVM_BB_ADDR_MAP] Adds pretty printing of BFI and BPI for PGO Analysis Map in tools. (#82292)

Primary change is to add a flag `--pretty-pgo-analysis-map` to
llvm-readobj and llvm-objdump that prints block frequencies and branch
probabilities in the same manner as BFI and BPI respectively. This can
be helpful if you are manually inspecting the outputs from the tools.

In order to print, I moved the `printBlockFreqImpl` function from
Analysis to Support and renamed it to `printRelativeBlockFreq`.



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