Main file / top-level module for regalloc library.
We have tried hard to make the library’s interface as simple as possible, yet flexible enough that the allocators it implements can provide good quality allocations in reasonable time. Nevertheless, there is still significant semantic complexity in parts of the interface. If you intend to use this library in your own code, you would be well advised to read the comments in this file very carefully.
A set of errors detected by the regalloc checker.
Tweakable options shared by all the allocators.
The result of register allocation. Note that allocation can fail!
Information about a single register class in the
A structure with which callers can request stackmap information.
A “writable register”. This is a zero-cost wrapper that can be used to create a distinction, at the Rust type level, between a plain “register” and a “writable register”.
A choice of register allocation algorithm to run.
A single error detected by the regalloc checker.
An error from the register allocator.
The number of register classes that exist. N.B.: must be <= 7 (fit into 3 bits) for 32-bit VReg/RReg packed format!
A trait defined by the regalloc client to provide access to its machine-instruction / CFG representation.
A trait for printing instruction bits and pieces, with the the ability to take a
RealRegUniverse that is used to give proper names to registers.
PrettyPrint, but can also take a size hint into account to specialize the displayed
A trait for providing mapping results for a given instruction.
Set of requirements for types that can be wrapped in Writable.
Allocate registers for a function’s code, given a universe of real registers that we are allowed to use.
Allocate registers for a function’s code, given a universe of real registers that we are allowed to use. Optionally, stackmap support may be requested.