rust/compiler/rustc_interface/src
bors a0e229abad Auto merge of #83649 - bjorn3:dedup_providers, r=petrochenkov
Don't duplicate the extern providers once for each crate

This should give a small perf improvement for small crates by avoiding a memcpy of a pretty big struct for each loaded crate. In addition would be useful for replacing the sequential `CrateNum` everywhere with the hash based `StableCrateId` introduced in #81635, which would allow avoiding remapping of `CrateNum`'s when loading crate metadata. While this PR is not strictly needed for that, it is necessary to prevent a performance loss due to it.

I think this duplication was done in https://github.com/rust-lang/rust/pull/40008 (which introduced the query system) to make it possible to compile multiple crates in a single session in the future. I think this is unlikely to be implemented any time soon. In addition this PR can easily be reverted if necessary to implement this.
2021-03-30 06:22:29 +00:00
..
callbacks.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
interface.rs Change the .unwrap to .expect with a helpful message 2021-03-15 20:45:45 +08:00
lib.rs Box the biggest ast::ItemKind variants 2021-02-01 09:23:39 +01:00
passes.rs Don't duplicate the extern providers once for each crate 2021-03-29 18:03:07 +02:00
proc_macro_decls.rs Remove hir::Item::attrs. 2021-03-09 19:27:50 +01:00
queries.rs Move the query system to rustc_query_impl. 2021-02-19 17:51:58 +01:00
tests.rs Address review comments 2021-03-27 22:16:34 -04:00
util.rs Document everybody_loops 2021-03-13 13:52:48 -08:00