MachineEnv fields are public
This commit is contained in:
21
src/lib.rs
21
src/lib.rs
@@ -863,10 +863,23 @@ pub enum Edit {
|
|||||||
/// as well.
|
/// as well.
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
pub struct MachineEnv {
|
pub struct MachineEnv {
|
||||||
regs: Vec<PReg>,
|
/// Physical registers. Every register that might be mentioned in
|
||||||
preferred_regs_by_class: Vec<Vec<PReg>>,
|
/// any constraint must be listed here, even if it is not
|
||||||
non_preferred_regs_by_class: Vec<Vec<PReg>>,
|
/// allocatable under normal conditions.
|
||||||
scratch_by_class: Vec<PReg>,
|
pub regs: Vec<PReg>,
|
||||||
|
/// Preferred physical registers for each class. These are the
|
||||||
|
/// registers that will be allocated first, if free.
|
||||||
|
pub preferred_regs_by_class: Vec<Vec<PReg>>,
|
||||||
|
/// Non-preferred physical registers for each class. These are the
|
||||||
|
/// registers that will be allocated if a preferred register is
|
||||||
|
/// not available; using one of these is considered suboptimal,
|
||||||
|
/// but still better than spilling.
|
||||||
|
pub non_preferred_regs_by_class: Vec<Vec<PReg>>,
|
||||||
|
/// One scratch register per class. This is needed to perform
|
||||||
|
/// moves between registers when cyclic move patterns occur. The
|
||||||
|
/// register should not be placed in either the preferred or
|
||||||
|
/// non-preferred list (i.e., it is not otherwise allocatable).
|
||||||
|
pub scratch_by_class: Vec<PReg>,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The output of the register allocator.
|
/// The output of the register allocator.
|
||||||
|
|||||||
Reference in New Issue
Block a user