diff options
author | Micah Weston <micahsweston@gmail.com> | 2024-02-27 14:13:00 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-27 14:13:00 -0500 |
commit | 9ca8db352d22444feabd859380252f13826a8aff (patch) | |
tree | f3aeac0d336a4851c07525c4e4707596af57f450 /llvm/docs/CommandGuide/llvm-objdump.rst | |
parent | 19181f24e516ce1cb58cd5ba27515eb968ae22d9 (diff) | |
download | llvm-9ca8db352d22444feabd859380252f13826a8aff.zip llvm-9ca8db352d22444feabd859380252f13826a8aff.tar.gz llvm-9ca8db352d22444feabd859380252f13826a8aff.tar.bz2 |
[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`.
Diffstat (limited to 'llvm/docs/CommandGuide/llvm-objdump.rst')
-rw-r--r-- | llvm/docs/CommandGuide/llvm-objdump.rst | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/llvm/docs/CommandGuide/llvm-objdump.rst b/llvm/docs/CommandGuide/llvm-objdump.rst index 959452a7..7f8def7 100644 --- a/llvm/docs/CommandGuide/llvm-objdump.rst +++ b/llvm/docs/CommandGuide/llvm-objdump.rst @@ -271,7 +271,12 @@ OPTIONS When printing a PC-relative global symbol reference, print it as an offset from the leading symbol. - When a bb-address-map section is present (i.e., the object file is built with ``-fbasic-block-sections=labels``), labels are retrieved from that section instead. + When a bb-address-map section is present (i.e., the object file is built with + ``-fbasic-block-sections=labels``), labels are retrieved from that section + instead. If a pgo-analysis-map is present alongside the bb-address-map, any + available analyses are printed after the relevant block label. By default, + any analysis with a special representation (i.e. BlockFrequency, + BranchProbability, etc) are printed as raw hex values. Only works with PowerPC objects or X86 linked images. @@ -291,6 +296,15 @@ OPTIONS cmp eax, dword ptr <g> jge <L0> +.. option:: --pretty-pgo-analysis-map + + When using :option:`--symbolize-operands` with bb-address-map and + pgo-analysis-map, print analyses using the same format as their analysis + passes would. An example of pretty format would be printing block frequencies + relative to the entry block, the same as BFI. + + Only works when :option:`--symbolize-operands` is enabled. + .. option:: --triple=<string> Target triple to disassemble for, see ``--version`` for available targets. |