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:
Chris Fallin
2021-06-22 12:06:12 -07:00
parent 245c212289
commit f27abc9c48
3 changed files with 3 additions and 6 deletions

View File

@@ -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();