[all-commits] [llvm/llvm-project] 7df28f: [SHT_LLVM_BB_ADDR_MAP][AsmPrinter] Implements PGOA...

Micah Weston via All-commits all-commits at lists.llvm.org
Wed Jan 3 16:17:58 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7df28fd61aa4603846b3ce16f9f988ccc780a584
      https://github.com/llvm/llvm-project/commit/7df28fd61aa4603846b3ce16f9f988ccc780a584
  Author: Micah Weston <micahsweston at gmail.com>
  Date:   2024-01-03 (Wed, 03 Jan 2024)

  Changed paths:
    M llvm/docs/Extensions.rst
    M llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
    M llvm/test/CodeGen/X86/basic-block-sections-labels-empty-function.ll
    A llvm/test/CodeGen/X86/basic-block-sections-labels-pgo-features.ll

  Log Message:
  -----------
  [SHT_LLVM_BB_ADDR_MAP][AsmPrinter] Implements PGOAnalysisMap emitting in AsmPrinter with tests. (#75202)

Uses machine analyses to emit PGOAnalysisMap into the bb-addr-map ELF
section. Implements filecheck tests to verify emitting new fields.

This patch emits optional PGO related analyses into the bb-addr-map ELF
section during AsmPrinter. This currently supports Function Entry Count,
Machine Block Frequencies. and Machine Branch Probabilities. Each is
independently enabled via the `feature` byte of `bb-addr-map` for the given
function.

A part of [RFC - PGO Accuracy Metrics: Emitting and Evaluating Branch and Block Analysis](https://discourse.llvm.org/t/rfc-pgo-accuracy-metrics-emitting-and-evaluating-branch-and-block-analysis/73902).




More information about the All-commits mailing list