Skip to content

Commit

Permalink
Hack out unify log for perf
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus Westerlind committed Oct 27, 2020
1 parent d3d3fc4 commit b27911a
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions compiler/rustc_data_structures/src/logged_unification_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,6 @@ where
where
K::Value: ut::UnifyValue<Error = ut::NoError>,
{
if self.storage.unify_log.needs_log(vid) {
self.storage.modified_set.set(&mut self.undo_log, vid);
}
let vid = vid.into();
let mut relations = self.relations();
debug_assert!(relations.find(vid) == vid);
Expand All @@ -131,10 +128,7 @@ where
vid: I,
value: K::Value,
) -> Result<(), <K::Value as ut::UnifyValue>::Error> {
let vid = self.find(vid).into();
if self.storage.unify_log.needs_log(vid) {
self.storage.modified_set.set(&mut self.undo_log, vid);
}
let vid = self.find(vid);
self.relations().unify_var_value(vid, value)
}

Expand All @@ -148,11 +142,6 @@ where

relations.unify_var_var(a, b)?;

if a == relations.find(a) {
self.storage.unify_log.unify(&mut self.undo_log, a.into(), b.into());
} else {
self.storage.unify_log.unify(&mut self.undo_log, b.into(), a.into());
}
Ok(())
}

Expand Down

0 comments on commit b27911a

Please sign in to comment.