Specialize query execution for incremental and non-incremental

This commit is contained in:
John Kåre Alsaker 2023-05-14 21:53:05 +02:00
parent eda41addfc
commit 882a9684f9
4 changed files with 76 additions and 17 deletions

View file

@ -691,6 +691,8 @@ pub fn create_global_ctxt<'tcx>(
callback(sess, &mut local_providers, &mut extern_providers);
}
let incremental = dep_graph.is_fully_enabled();
sess.time("setup_global_ctxt", || {
gcx_cell.get_or_init(move || {
TyCtxt::create_global_ctxt(
@ -705,6 +707,7 @@ pub fn create_global_ctxt<'tcx>(
local_providers,
extern_providers,
query_result_on_disk_cache,
incremental,
),
)
})