Remove register class from SpillSlot (#80)
* Remove register class from `SpillSlot` The register allocator was already allowing moves between spillslots and registers of different classes, so this PR formalizes this by making spillslots independent of register class. This also fixes #79 by properly tracking the register class of an `InsertedMove` with the `to_vreg` field which turns out to never be `None` in practice. Removing the `Option` allows the register class of the `VReg` to be used when building the per-class move lists. Fixes #79 * Address review feedback
This commit is contained in:
@@ -440,7 +440,7 @@ impl<'a, F: Function> Env<'a, F> {
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct SpillSlotData {
|
||||
pub ranges: LiveRangeSet,
|
||||
pub class: RegClass,
|
||||
pub slots: u32,
|
||||
pub alloc: Allocation,
|
||||
}
|
||||
|
||||
@@ -580,7 +580,7 @@ pub struct InsertedMove {
|
||||
pub pos_prio: PosWithPrio,
|
||||
pub from_alloc: Allocation,
|
||||
pub to_alloc: Allocation,
|
||||
pub to_vreg: Option<VReg>,
|
||||
pub to_vreg: VReg,
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord)]
|
||||
|
||||
Reference in New Issue
Block a user