GCC Newspaper
NOVEMBER 30, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
arm Performance Win

Arm minipool code reworked to use subpools

Refactors Arm's minipool code to use subpools, fixing alignment bugs and improving constant insertion.

The Arm minipool code has been significantly refactored to manage pools as sets of subpools, each handling constants with common alignment requirements. This resolves subtle bugs that arose from earlier attempts to accommodate 64-bit alignment. The new design also improves the handling of backward references by checking for existing reachable constants before inserting duplicates. Additionally, the code now prioritizes using existing constants in their current pool locations over adding new ones, further optimizing constant usage.

In Details

The Arm backend's minipool, responsible for managing literals like jump table entries, was re-architected from a single pool with alignment assumptions to a system of subpools. This addresses issues where 64-bit alignment requirements were inconsistently applied, leading to layout problems. The refactoring also enhances the logic for reusing existing constants, preventing redundant entries and improving code density. This change touches config/arm/minipool.cc and related files, impacting literal pool management.

For Context
minipool
A data structure in the GCC ARM backend used to efficiently store and manage small constants, particularly jump table entries, that are placed near the code they reference.
subpool
A division within the minipool that groups constants requiring the same alignment, allowing for more flexible and accurate management of literal pool layouts.
alignment
The requirement that data be stored at memory addresses that are multiples of a specific power of two, which can improve performance or be necessary for certain data types or instructions.
backward reference
A reference in code that points to a location that has already been defined or processed, common when resolving jumps or data access in compiled code.
Filed Under: armoptimizationrefactoring