Constrain solver variables as little as possible.
When solver variables represent operands on the current instruction, they need to be constrained as required by the instructions, but variables that are simply moved out of the way should only be constrained to their top-level register class. The live range affinity is just a hint, not a requirement.
This commit is contained in:
@@ -296,6 +296,11 @@ impl RegInfo {
|
||||
pub fn rc(&self, idx: RegClassIndex) -> RegClass {
|
||||
self.classes[idx.index()]
|
||||
}
|
||||
|
||||
/// Get the top-level register class containing the `idx` class.
|
||||
pub fn toprc(&self, idx: RegClassIndex) -> RegClass {
|
||||
self.classes[self.rc(idx).toprc as usize]
|
||||
}
|
||||
}
|
||||
|
||||
/// Temporary object that holds enough information to print a register unit.
|
||||
|
||||
Reference in New Issue
Block a user