Skip to content

Commit

Permalink
Remove fixpoint loop early-continue optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
fitzgen committed Feb 2, 2024
1 parent 7223562 commit 6eced83
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions cranelift/codegen/src/egraph/elaborate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,12 +241,6 @@ impl<'a> Elaborator<'a> {
self.stats.elaborate_best_cost_fixpoint_iters += 1;

for (value, def) in self.func.dfg.values_and_defs() {
// If the cost of this value is finite, then we've already found
// its final cost.
if best[value].0.is_finite() {
continue;
}

trace!("computing best for value {:?} def {:?}", value, def);
let orig_best_value = best[value];

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

0 comments on commit 6eced83

Please sign in to comment.