[][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

BacktrackingOptions
CheckerErrors

A set of errors detected by the regalloc checker.

IRSnapshot
LinearScanOptions
Options

Tweakable options shared by all the allocators.

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
StackmapRequestInfo

A structure with which callers can request stackmap information.

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

Algorithm
AlgorithmWithDefaults

A choice of register allocation algorithm to run.

AnalysisError
BlockIx
CheckerError

A single error detected by the regalloc checker.

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

RegUsageMapper

A trait for providing mapping results for a given instruction.

Functions

allocate_registers

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

allocate_registers_with_opts

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.

Type Definitions

Map