Add an AllocatableSet for registers.

This set of available register units also manages register aliasing in
an efficient way.

Detect if the units in a register straddles mask words. The algorithm
for allocating multi-unit registers expect the whole register to be
inside a single mask word. We could handle this if necessary, but so far
no ISAs need it.
This commit is contained in:
Jakob Stoklund Olesen
2017-01-20 14:41:06 -08:00
parent 1d21422032
commit 3b83496edb
5 changed files with 187 additions and 5 deletions

View File

@@ -41,7 +41,7 @@
//! concurrent function compilations.
pub use isa::encoding::Encoding;
pub use isa::registers::{RegUnit, RegBank, RegInfo};
pub use isa::registers::{RegInfo, RegUnit, RegClass};
use settings;
use ir::{InstructionData, DataFlowGraph};
@@ -49,9 +49,9 @@ pub mod riscv;
pub mod intel;
pub mod arm32;
pub mod arm64;
pub mod registers;
mod encoding;
mod enc_tables;
mod registers;
/// Look for a supported ISA with the given `name`.
/// Return a builder that can create a corresponding `TargetIsa`.