about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-03-30 06:22:29 +0000
committerbors <bors@rust-lang.org>2021-03-30 06:22:29 +0000
commita0e229abadfe47df74625309fba44c0f3b8a0649 (patch)
tree405ba01d86c506ac646652a609df4159426bcd13 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parent32d3276561e88bfdf92cc483cff842a24fdd4b37 (diff)
parentcd7a011f37c51d6cb367e87c37b4d7bc464da09d (diff)
downloadrust-a0e229abadfe47df74625309fba44c0f3b8a0649.tar.gz
rust-a0e229abadfe47df74625309fba44c0f3b8a0649.zip
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.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions