Skip to content

Commit 6eced83

Browse files
committed
Remove fixpoint loop early-continue optimization
1 parent 7223562 commit 6eced83

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

cranelift/codegen/src/egraph/elaborate.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -241,12 +241,6 @@ impl<'a> Elaborator<'a> {
241241
self.stats.elaborate_best_cost_fixpoint_iters += 1;
242242

243243
for (value, def) in self.func.dfg.values_and_defs() {
244-
// If the cost of this value is finite, then we've already found
245-
// its final cost.
246-
if best[value].0.is_finite() {
247-
continue;
248-
}
249-
250244
trace!("computing best for value {:?} def {:?}", value, def);
251245
let orig_best_value = best[value];
252246

@@ -299,7 +293,7 @@ impl<'a> Elaborator<'a> {
299293
if cfg!(any(feature = "trace-log", debug_assertions)) {
300294
trace!("finished fixpoint loop to compute best value for each eclass");
301295
for value in self.func.dfg.values() {
302-
debug_assert_ne!(best[value].0, Cost::infinity());
296+
debug_assert!(best[value].0.is_finite());
303297
debug_assert_ne!(best[value].1, Value::reserved_value());
304298
trace!("-> best for eclass {:?}: {:?}", value, best[value]);
305299
}

0 commit comments

Comments
 (0)