Add a spilling pass which lowers register pressure by assigning SSA values to the stack. Important missing features: - Resolve conflicts where an instruction uses the same value more than once in incompatible ways. - Deal with EBB arguments. Fix bugs in the reload pass exposed by the first test case: - Create live ranges for temporary registers. - Set encodings on created spill and fill instructions.
22 lines
439 B
Rust
22 lines
439 B
Rust
//! Register allocation.
|
|
//!
|
|
//! This module contains data structures and algorithms used for register allocation.
|
|
|
|
pub mod liverange;
|
|
pub mod liveness;
|
|
pub mod allocatable_set;
|
|
pub mod live_value_tracker;
|
|
pub mod coloring;
|
|
|
|
mod affinity;
|
|
mod context;
|
|
mod diversion;
|
|
mod pressure;
|
|
mod reload;
|
|
mod solver;
|
|
mod spilling;
|
|
|
|
pub use self::allocatable_set::AllocatableSet;
|
|
pub use self::context::Context;
|
|
pub use self::diversion::RegDiversions;
|