@@ -863,10 +863,23 @@ pub enum Edit {
863
863
/// as well.
864
864
#[ derive( Clone , Debug ) ]
865
865
pub struct MachineEnv {
866
- regs : Vec < PReg > ,
867
- preferred_regs_by_class : Vec < Vec < PReg > > ,
868
- non_preferred_regs_by_class : Vec < Vec < PReg > > ,
869
- scratch_by_class : Vec < PReg > ,
866
+ /// Physical registers. Every register that might be mentioned in
867
+ /// any constraint must be listed here, even if it is not
868
+ /// allocatable under normal conditions.
869
+ pub regs : Vec < PReg > ,
870
+ /// Preferred physical registers for each class. These are the
871
+ /// registers that will be allocated first, if free.
872
+ pub preferred_regs_by_class : Vec < Vec < PReg > > ,
873
+ /// Non-preferred physical registers for each class. These are the
874
+ /// registers that will be allocated if a preferred register is
875
+ /// not available; using one of these is considered suboptimal,
876
+ /// but still better than spilling.
877
+ pub non_preferred_regs_by_class : Vec < Vec < PReg > > ,
878
+ /// One scratch register per class. This is needed to perform
879
+ /// moves between registers when cyclic move patterns occur. The
880
+ /// register should not be placed in either the preferred or
881
+ /// non-preferred list (i.e., it is not otherwise allocatable).
882
+ pub scratch_by_class : Vec < PReg > ,
870
883
}
871
884
872
885
/// The output of the register allocator.
0 commit comments