Remove PRegData::reg and use PReg::from_index instead

Performance impact is negligible but this is a good cleanup.
This commit is contained in:
Amanieu d'Antras
2022-01-11 04:07:05 +00:00
parent 74928b83fa
commit 053375f049
4 changed files with 4 additions and 12 deletions

View File

@@ -197,7 +197,7 @@ impl<'a, F: Function> Env<'a, F> {
}
// We can allocate! Add our ranges to the preg's BTree.
let preg = self.pregs[reg.index()].reg;
let preg = PReg::from_index(reg.index());
log::trace!(" -> bundle {:?} assigned to preg {:?}", bundle, preg);
self.bundles[bundle.index()].allocation = Allocation::reg(preg);
for entry in &self.bundles[bundle.index()].ranges {