Give RegClassData a reference to its parent RegInfo.
This makes it possible to materialize new RegClass references without requiring a RegInfo reference to be passed around. - Move the RegInfo::toprc() method to RegClassData. - Rename RegClassData::intersect() to intersect_index() and provide a new intersect() which returns a register class. - Remove some &RegInfo parameters that are no longer needed.
This commit is contained in:
@@ -95,7 +95,7 @@ impl Affinity {
|
||||
{
|
||||
// If the register classes don't overlap, `intersect` returns `None`, and we
|
||||
// just keep our previous affinity.
|
||||
if let Some(subclass) = constraint.regclass.intersect(reg_info.rc(rc)) {
|
||||
if let Some(subclass) = constraint.regclass.intersect_index(reg_info.rc(rc)) {
|
||||
// This constraint shrinks our preferred register class.
|
||||
*self = Affinity::Reg(subclass);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user