Always recompute prio when recomputing bundle properties; otherwise is zero on new bundles and causes spill weight to be zeroed
This commit is contained in:
@@ -2823,6 +2823,8 @@ impl<'a, F: Function> Env<'a, F> {
|
|||||||
let first_range = bundledata.ranges[0].index;
|
let first_range = bundledata.ranges[0].index;
|
||||||
let first_range_data = &self.ranges[first_range.index()];
|
let first_range_data = &self.ranges[first_range.index()];
|
||||||
|
|
||||||
|
self.bundles[bundle.index()].prio = self.compute_bundle_prio(bundle);
|
||||||
|
|
||||||
if first_range_data.vreg.is_invalid() {
|
if first_range_data.vreg.is_invalid() {
|
||||||
log::debug!(" -> no vreg; minimal and fixed");
|
log::debug!(" -> no vreg; minimal and fixed");
|
||||||
minimal = true;
|
minimal = true;
|
||||||
@@ -3264,17 +3266,15 @@ impl<'a, F: Function> Env<'a, F> {
|
|||||||
|
|
||||||
if self.bundles[bundle.index()].ranges.len() > 0 {
|
if self.bundles[bundle.index()].ranges.len() > 0 {
|
||||||
self.recompute_bundle_properties(bundle);
|
self.recompute_bundle_properties(bundle);
|
||||||
let prio = self.compute_bundle_prio(bundle);
|
let prio = self.bundles[bundle.index()].prio;
|
||||||
self.bundles[bundle.index()].prio = prio;
|
|
||||||
self.allocation_queue
|
self.allocation_queue
|
||||||
.insert(bundle, prio as usize, reg_hint);
|
.insert(bundle, prio as usize, reg_hint);
|
||||||
}
|
}
|
||||||
if self.bundles[new_bundle.index()].ranges.len() > 0 {
|
if self.bundles[new_bundle.index()].ranges.len() > 0 {
|
||||||
self.recompute_bundle_properties(new_bundle);
|
self.recompute_bundle_properties(new_bundle);
|
||||||
let new_prio = self.compute_bundle_prio(new_bundle);
|
let prio = self.bundles[new_bundle.index()].prio;
|
||||||
self.bundles[new_bundle.index()].prio = new_prio;
|
|
||||||
self.allocation_queue
|
self.allocation_queue
|
||||||
.insert(new_bundle, new_prio as usize, reg_hint);
|
.insert(new_bundle, prio as usize, reg_hint);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user