Remove infinite-loop check: it is not a high enough bound in some pathological cases (e.g., gc::many_live_refs test in wasmtime), and it has served its purpose in testing. We can rely on more detailed assertions, e.g. that splits actually shrink bundles and that bundles evict only lower-priority bundles, instead.
This commit is contained in:
@@ -337,6 +337,8 @@ pub struct Env<'a, F: Function> {
|
||||
pub num_spillslots: u32,
|
||||
pub safepoint_slots: Vec<(ProgPoint, SpillSlot)>,
|
||||
|
||||
pub allocated_bundle_count: usize,
|
||||
|
||||
pub stats: Stats,
|
||||
|
||||
// For debug output only: a list of textual annotations at every
|
||||
|
||||
@@ -68,6 +68,7 @@ impl<'a, F: Function> Env<'a, F> {
|
||||
spilled_bundles: vec![],
|
||||
spillslots: vec![],
|
||||
slots_by_size: vec![],
|
||||
allocated_bundle_count: 0,
|
||||
|
||||
extra_spillslot: vec![None, None],
|
||||
|
||||
|
||||
@@ -36,15 +36,9 @@ pub enum AllocRegResult {
|
||||
|
||||
impl<'a, F: Function> Env<'a, F> {
|
||||
pub fn process_bundles(&mut self) -> Result<(), RegAllocError> {
|
||||
let mut count = 0;
|
||||
while let Some((bundle, reg_hint)) = self.allocation_queue.pop() {
|
||||
self.stats.process_bundle_count += 1;
|
||||
self.process_bundle(bundle, reg_hint)?;
|
||||
count += 1;
|
||||
if count > self.func.insts() * 50 {
|
||||
self.dump_state();
|
||||
panic!("Infinite loop!");
|
||||
}
|
||||
}
|
||||
self.stats.final_liverange_count = self.ranges.len();
|
||||
self.stats.final_bundle_count = self.bundles.len();
|
||||
|
||||
Reference in New Issue
Block a user