Tweak comments in regalloc code.

This commit is contained in:
Benjamin Bouvier
2019-10-29 18:20:42 +01:00
parent d6b3ca28b4
commit 8c2d9fd32f
2 changed files with 4 additions and 9 deletions

View File

@@ -92,10 +92,8 @@ impl Affinity {
// to change anything.
if constraint.kind != ConstraintKind::Stack && !constraint.regclass.has_subclass(rc)
{
// If the register classes don't overlap, `intersect` returns `Unassigned`, and
// we just keep our previous affinity.
// If the register classes overlap, try to shrink our preferred register class.
if let Some(subclass) = constraint.regclass.intersect_index(reginfo.rc(rc)) {
// This constraint shrinks our preferred register class.
*self = Self::Reg(subclass);
}
}