[all-commits] [llvm/llvm-project] a85091: [BOLT] Require CFG in BAT mode (#150488)

Amir Ayupov via All-commits all-commits at lists.llvm.org
Fri Jul 25 04:54:58 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a850912de18cf5dd5d92837bb159bf227ef830d6
      https://github.com/llvm/llvm-project/commit/a850912de18cf5dd5d92837bb159bf227ef830d6
  Author: Amir Ayupov <aaupov at fb.com>
  Date:   2025-07-25 (Fri, 25 Jul 2025)

  Changed paths:
    M bolt/lib/Profile/DataAggregator.cpp
    M bolt/lib/Rewrite/RewriteInstance.cpp
    M bolt/test/X86/unclaimed-jt-entries.s

  Log Message:
  -----------
  [BOLT] Require CFG in BAT mode (#150488)

`getFallthroughsInTrace` requires CFG for functions not covered by BAT,
even in BAT/fdata mode. BAT-covered functions go through special
handling in fdata (`BAT->getFallthroughsInTrace`) and YAML
(`DataAggregator::writeBATYAML`) modes.

Since all modes (BAT/no-BAT, YAML/fdata) now need disassembly/CFG
construction:
- drop special BAT/fdata handling that omitted disassembly/CFG in
  `RewriteInstance::run`, enabling *CFG for all non-BAT functions*,
- switch `getFallthroughsInTrace` to check if a function has CFG,
- which *allows emitting profile for non-simple functions* in all modes.

Previously, traces in non-simple functions were reported as invalid/
mismatching disassembled function contents. This change reduces the
number of such invalid traces and increases the number of profiled
functions. These functions may participate in function reordering via
call graph profile.

Test Plan: updated unclaimed-jt-entries.s



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