feat(backend): propagate coalesced node colors in AssignColors\n\nAfter active coalescing, merged_set nodes inherit their representative's\ncolor, ensuring move-related vregs share the same physical register.

master
黄熙哲 1 week ago
parent 081580ac0a
commit 99fe17fc3f

@ -985,6 +985,18 @@ namespace mir
}
}
// 将合并节点的颜色设为其代表节点的颜色
for (int v : merged_set)
{
int rep_v = GetRep(v);
auto it = colored.find(rep_v);
if (it != colored.end())
{
colored[v] = it->second;
result.assignment[v] = it->second;
}
}
return result;
}

Loading…
Cancel
Save