This page summarizes default-off BOLT optimization flags that users may explicitly enable when optimizing AArch64 binaries.
BOLT is to be used with binaries linked with relocations (--emit-relocs or -Wl,-q) and representative profile data.
The following code-layout optimizations are typically the first options to consider when optimizing AArch64 binaries with representative profile data. They typically provide the largest performance gains among BOLT optimizations.
:::{list-table} :header-rows: 1 :widths: 34 42 :align: left
--reorder-functions=exec-count|hfsort|cdsort|pettis-hansen|random|user --function-order=<file>--reorder-blocks=normal|ext-tsp|cache|branch-predictor|reverse|cluster-shuffle--split-functions --split-strategy=profile2|random2|randomN|all --split-all-cold --split-ehThe following optimizations are also supported for AArch64.
:::{list-table} :header-rows: 1 :widths: 34 42 :align: left
--align-blocks --block-alignment=<uint>--tail-duplication=aggressive|moderate|cache--peepholes=double-jumps|tailcall-traps|useless-branches|all--inline-all --inline-small-functions Related options: --inline-ap --inline-limit=<uint> --inline-small-functions-bytes=<uint>--icf=safe|allThe following flags are implemented for AArch64, but require specific runtime or option conditions. Enabling them without the required conditions may report an error or perform no transformation.
:::{list-table} :header-rows: 1 :widths: 30 28 44 :align: left
--inline-memcpymemcpy calls--plt=hot|all-znow.--hugify--instrument is used.--reorder-data=<section1,section2,...> --reorder-data-algo=count|funcsmove, split and aggressive disable data reordering.--split-strategy=cdsplit--compact-code-model on AArch64. :::The following flags are not available for AArch64. Not applicable to AArch64 means the optimization targets architectural features or mechanisms that do not apply to AArch64. Not implemented for AArch64 means the optimization could be relevant, but is not currently implemented for this target.
:::{list-table} :header-rows: 1 :widths: 30 28 42 :align: left
--jt-footprint-reduction--three-way-branch--simplify-rodata-loads--frame-opt=hot|all--indirect-call-promotion=calls|jump-tables|all--memcpy1-spec=<func1,func2:cs1:cs2,...>memcpy calls--reg-reassign--cmov-conversion--stoke
--stoke-out
Emit STOKE optimization data
Not applicable to AArch64.
--insert-retpolines