[][src]Crate regalloc

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.

Structs

CheckerErrors

A set of errors detected by the regalloc checker.

Range
RealReg
RealRegUniverse
Reg
RegAllocResult

The result of register allocation. Note that allocation can fail!

RegClassInfo

Information about a single register class in the RealRegUniverse.

RegUsageCollector
Set
TypedIxVec
VirtualReg
Writable

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".

Enums

AnalysisError
BlockIx
CheckerError

A single error detected by the regalloc checker.

InstIx
RegAllocAlgorithm

A choice of register allocation algorithm to run.

RegAllocError

An error from the register allocator.

RegClass
SpillSlot

Constants

NUM_REG_CLASSES

The number of register classes that exist. N.B.: must be <= 7 (fit into 3 bits) for 32-bit VReg/RReg packed format!

Traits

Function

A trait defined by the regalloc client to provide access to its machine-instruction / CFG representation.

Functions

allocate_registers

Allocate registers for a function's code, given a universe of real registers that we are allowed to use.

Type Definitions

Map