llvm-c166/bolt/docs
Alexandros Lamprineas 3cc4656425
[BOLT][AArch64] Expand cmpbr when reversing would overflow (#202998)
AArch64 compare-and-branch instructions can usually be reversed by
changing the condition and adjusting the immediate. At boundary values,
that adjustment can underflow or overflow, leaving the branch
non-reversible.

When condition flags are dead at such a branch, split the compare branch
into an explicit compare followed by a conditional branch. The new
sequence lets branch fixup reverse the condition without relying on an
out-of-range adjusted immediate.

Teach the branch-fixing paths to use cached branch liveness information
when deciding whether this expansion is legal. The liveness snapshot is
built before branch relaxation/fixup and is safe for the current users:
they only insert trampolines/stubs between existing CFG edges or invert
branches without changing program semantics.

Since expansion can grow the source basic block, update the local
address accounting used by branch relaxation.

Assisted-by: Codex
2026-08-07 08:38:40 +01:00
..
_static
BAT.md
BinaryAnalysis.md
BOLTAArch64OptimizationStatus.md
CMakeLists.txt
CommandLineArgumentReference.md
conf.py
doxygen-mainpage.dox
doxygen.cfg.in
generate_doc.py
GettingStarted.md
Heatmap.png
HeatmapHeader.png [BOLT][docs] Expand Heatmaps.md (#98162) 2024-07-15 08:53:27 +01:00
Heatmaps.md [BOLT] Add --ba flag to deprecate --nl (#164257) 2025-10-23 10:13:28 +01:00
index.md [BOLT][docs] New backend guide (#211382) 2026-07-22 14:44:36 -07:00
NewBackend.md
OptimizingClang.md
OptimizingLinux.md
PointerAuthDesign.md
profiles.md [BOLT] Add fdata symbols mode (#209932) 2026-07-16 17:31:30 -07:00
README.txt [BOLT][Docs] Add Sphinx documentation 2023-01-03 17:39:09 -08:00
RuntimeLibrary.md [bolt] Fix typos discovered by codespell (#124726) 2025-10-14 14:45:40 +02:00

BOLT Documentation
====================

The BOLT documentation is written using the Sphinx documentation generator. It
is currently tested with Sphinx 1.1.3.

To build the documents into html configure BOLT with the following cmake options:

  * -DLLVM_ENABLE_SPHINX=ON
  * -DBOLT_INCLUDE_DOCS=ON

After configuring BOLT with these options the make rule `docs-bolt-html` should
be available.