Do not mark whether a module has specialization deps incrementally

Whether a module has a dependency on another module for specialization
is already accounted for when the build graph was initially populated,
and should not be modified again.

Closes #4622
This commit is contained in:
Ayaz Hafiz 2022-12-01 09:07:20 -06:00
parent 2a27d3c05f
commit 1ab41bf6b5
No known key found for this signature in database
GPG Key ID: 0E2A37416A25EF58
2 changed files with 9 additions and 3 deletions

View File

@ -3003,7 +3003,10 @@ fn update<'a>(
);
}
log!("re-launching specializations pass");
log!(
"re-launching make-specializations: pass {}",
state.make_specializations_pass.current_pass() + 1
);
state.make_specializations_pass.inc();

View File

@ -454,6 +454,8 @@ impl<'a> Dependencies<'a> {
pub fn load_find_and_make_specializations_after_check(&mut self) -> MutSet<(ModuleId, Phase)> {
let mut output = MutSet::default();
// Take out the specialization dependency graph, as this should not be modified as we
// reload the build graph. We'll make sure the state is unaffected at the end of this call.
let mut make_specializations_dependents = MakeSpecializationsDependents::default();
let default_make_specializations_dependents_len = make_specializations_dependents.0.len();
std::mem::swap(
@ -484,8 +486,9 @@ impl<'a> Dependencies<'a> {
self.add_dependency(module_dep, module, Phase::MakeSpecializations);
self.add_dependency(ModuleId::DERIVED_GEN, module, Phase::MakeSpecializations);
// `module_dep` can't make its specializations until the current module does.
info.has_pred = true;
// That `module_dep` can't make its specializations until the current module does
// should already be accounted for in `make_specializations_dependents`, which we
// populated when initially building the graph.
}
if module != ModuleId::DERIVED_GEN {