summaryrefslogtreecommitdiff
path: root/bolt/docs/CommandLineArgumentReference.md
AgeCommit message (Collapse)Author
2025-11-04[BOLT][NFC] Clean up the outdated option --write-dwp in doc (#166150)Jinjie Huang
Since the "--write-dwp" option has been removed in [PR](https://github.com/llvm/llvm-project/pull/100771), this patch also cleans up the corresponding document and test to avoid misleading issues.
2025-10-14[bolt] Fix typos discovered by codespell (#124726)Christian Clauss
https://github.com/codespell-project/codespell ```bash codespell bolt --skip="*.yaml,Maintainers.txt" --write-changes \ --ignore-words-list=acount,alledges,ans,archtype,defin,iself,mis,mmaped,othere,outweight,vas ```
2025-09-09[BOLT][AArch64] Inlining of Memcpy (#154929)YafetBeyene
The pass for inlining memcpy in BOLT was currently X86-specific and was using the instruction `rep movsb`. This patch implements a static size analysis system for AArch64 memcpy inlining that extracts copy sizes from preceding instructions to then use it to generate the optimal width-specific load/store sequences.
2025-08-22[BOLT] Add dump-dot-func option for selective function CFG dumping (#153007)YafetBeyene
## Change: * Added `--dump-dot-func` command-line option that allows users to dump CFGs only for specific functions instead of dumping all functions (the current only available option being `--dump-dot-all`) ## Usage: * Users can now specify function names or regex patterns (e.g., `--dump-dot-func=main,helper` or `--dump-dot-func="init.*`") to generate .dot files only for functions of interest * Aims to save time when analysing specific functions in large binaries (e.g., only dumping graphs for performance-critical functions identified through profiling) and we can now avoid reduce output clutter from generating thousands of unnecessary .dot files when analysing large binaries ## Testing The introduced test `dump-dot-func.test` confirms the new option does the following: - [x] 1. `dump-dot-func` can correctly filter a specified functions - [x] 2. Can achieve the above with regexes - [x] 3. Can do 1. with a list of functions - [x] No option specified creates no dot files - [x] Passing in a non-existent function generates no dumping messages - [x] `dump-dot-all` continues to work as expected
2024-12-26[BOLT/docs] The support for macro-op fusion was removed. (#121158)Davide Italiano
Update the documentation accordingly.
2024-12-16[BOLT] Add support for safe-icf (#116275)Alexander Yermolovich
Identical Code Folding (ICF) folds functions that are identical into one function, and updates symbol addresses to the new address. This reduces the size of a binary, but can lead to problems. For example when function pointers are compared. This can be done either explicitly in the code or generated IR by optimization passes like Indirect Call Promotion (ICP). After ICF what used to be two different addresses become the same address. This can lead to a different code path being taken. This is where safe ICF comes in. Linker (LLD) does it using address significant section generated by clang. If symbol is in it, or an object doesn't have this section symbols are not folded. BOLT does not have the information regarding which objects do not have this section, so can't re-use this mechanism. This implementation scans code section and conservatively marks functions symbols as unsafe. It treats symbols as unsafe if they are used in non-control flow instruction. It also scans through the data relocation sections and does the same for relocations that reference a function symbol. The latter handles the case when function pointer is stored in a local or global variable, etc. If a relocation address points within a vtable these symbols are skipped.
2024-08-08[BOLT][DWARF] Add parallelization for processing of DWO debug information ↵Sayhaan Siddiqui
(#100282) Enables parallelization for the processing of DWO CUs.
2024-07-22[BOLT] Fix typo from alterantive to alternative (#99704)Jordan Brantner
Fix typo from `alterantive` -> `alternative` Signed-off-by: Jordan Brantner <brantnej@oregonstate.edu>
2024-07-19[BOLT][DWARF] Remove deprecated opt (#99575)Sayhaan Siddiqui
Remove deprecated DeterministicDebugInfo option and its uses.
2024-07-19[BOLT] Match functions with call graph (#98125)Shaw Young
Implemented call graph function matching. First, two call graphs are constructed for both profiled and binary functions. Then functions are hashed based on the names of their callee/caller functions. Finally, functions are matched based on these neighbor hashes and the longest common prefix of their names. The `match-with-call-graph` flag turns this matching on. Test Plan: Added match-with-call-graph.test. Matched 164 functions in a large binary with 10171 profiled functions.
2024-07-15[BOLT] Add -print-mappings option to heatmaps (#97567)Paschalis Mpeis
Emit a mapping in the legend between the characters/buckets and the text sections, using: ```sh llvm-heatmap-bolt -print-mappings .. ``` Example: ``` Legend: .. Sections: a/A : .init 0x00000100-0x00000200 b/B : .plt 0x00000200-0x00000500 c/C : .text 0x00010000-0x000a0000 d/D : .fini 0x000a0000-0x000f0000 .. ```
2024-07-03[BOLT] Match functions with name similarity (#95884)Shaw Young
A mapping - from namespace to associated binary functions - is used to match function profiles to binary based on the '--name-similarity-function-matching-threshold' flag set edit distance threshold. The flag is set to 0 (exact name matching) by default as it is expensive, requiring the processing of all BFs. Test Plan: Added name-similarity-function-matching.test. On a binary with 5M functions, rewrite passes took ~520s without the flag and ~2018s with the flag set to 20.
2024-06-29[BOLT] Match functions with exact hash (#96572)Shaw Young
Added flag '--match-profile-with-function-hash' to match functions based on exact hash. After identical and LTO name matching, more functions can be recovered for inference with exact hash, in the case of function renaming with no functional changes. Collisions are possible in the unlikely case where multiple functions share the same exact hash. The flag is off by default as it requires the processing of all binary functions and subsequently is expensive. Test Plan: added hashing-based-function-matching.test.
2024-06-25Revert "[𝘀𝗽𝗿] initial version"shawbyoung
This reverts commit bb5ab1ffe719f5e801ef08ac08be975546aa3266.
2024-06-25[𝘀𝗽𝗿] initial versionshawbyoung
Created using spr 1.3.4
2024-06-24Revert "[BOLT] Hash-based function matching" (#96568)shaw young
Reverts llvm/llvm-project#95821
2024-06-24[BOLT] Hash-based function matching (#95821)shaw young
Using the hashes of binary and profiled functions to recover functions with changed names. Test Plan: added hashing-based-function-matching.test.
2024-06-24[BOLT][NFC] Sync CommandLineArgumentReference with options (#96563)shaw young
2024-06-17[BOLT] Drop high discrepancy profiles in matching (#95156)shaw young
Summary: Functions with high discrepancy (measured by matched function blocks) can be ignored with an added command line argument for better performance. Test Plan: Added stale-matching-min-matched-block.test --------- Co-authored-by: Amir Ayupov <aaupov@fb.com>
2024-05-31[BOLT][DOC] Add script for automatic user guide generation (#93822)Elvina Yakubova
2024-05-15[BOLT][NFC] Add documentation on BOLT options (#92117)Elvina Yakubova
Add .md file documentation with all BOLT options to display it more conveniently.