Apply review feedback

This commit is contained in:
Amanieu d'Antras
2021-12-12 00:33:30 +00:00
parent 38ffc479c2
commit 51493ab03a
9 changed files with 106 additions and 304 deletions

View File

@@ -13,8 +13,8 @@
//! Bundle merging.
use super::{
Env, LiveBundleIndex, LiveRangeIndex, LiveRangeKey, Requirement, SpillSet, SpillSetIndex,
SpillSlotIndex, VRegIndex,
Env, LiveBundleIndex, LiveRangeIndex, LiveRangeKey, SpillSet, SpillSetIndex, SpillSlotIndex,
VRegIndex,
};
use crate::{Function, Inst, OperandConstraint, PReg};
use smallvec::smallvec;
@@ -99,11 +99,7 @@ impl<'a, F: Function> Env<'a, F> {
|| self.bundles[to.index()].cached_stack()
|| self.bundles[to.index()].cached_fixed()
{
let req = self
.compute_requirement(from)
.0
.merge(self.compute_requirement(to).0);
if req == Requirement::Conflict {
if self.merge_bundle_requirements(from, to).is_err() {
log::trace!(" -> conflicting requirements; aborting merge");
return false;
}