AArch64 Optimization and Flags Status¶
Overview¶
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.
Main Code-Layout Optimizations¶
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.
Flag |
Optimization |
|---|---|
|
Reorder functions |
|
Reorder basic blocks |
|
Split hot and cold code |
Other Supported Optimizations¶
The following optimizations are also supported for AArch64.
Flag |
Optimization |
|---|---|
|
Align basic blocks |
|
Duplicate branch tails |
|
Run peephole optimizations |
|
Inline functions |
|
Fold identical functions |
Supported Flags With Limitations¶
The 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.
Flag |
Optimization |
Notes |
|---|---|---|
|
Inline fixed-size |
Only applies when the copy size is a known constant; AArch64 skips sizes over 64 bytes. |
|
Optimize PLT calls |
Requires immediate binding. If BOLT cannot update the binary, relink with |
|
Place hot code on huge pages |
Applies to binaries with a recognized entry point; skipped when |
|
Reorder data sections |
|
|
Split functions using cache-directed splitting |
Requires |
Unsupported Flags¶
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.
Flag |
Optimization |
Notes |
|---|---|---|
|
Reduce jump-table footprint |
Not implemented for AArch64. |
|
Reorder three-way branches |
Not implemented for AArch64. |
|
Replace read-only data loads with constants |
Not implemented for AArch64. |
|
Optimize stack-frame accesses |
Not implemented for AArch64. |
|
Promote indirect calls |
Not implemented for AArch64. |
|
Specialize one-byte |
Not implemented for AArch64. |
|
Reassign registers to reduce encoding size |
Not applicable to AArch64. |
|
Convert branches to conditional moves |
Not applicable to AArch64. |
|
Emit STOKE optimization data |
Not applicable to AArch64. |
|
Insert retpolines |
Not applicable to AArch64. |