diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2018-05-10 11:35:23 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-05-10 11:35:23 -0500 |
| commit | 296f9524f2a27458607529db3f785dc732d79136 (patch) | |
| tree | 29ee18bf570f39e100414752abac3d75c2723ff9 /src/test/incremental/thinlto | |
| parent | bb130ce3cecec3079f78f50c79dd4b159fbfffa6 (diff) | |
| parent | ea4942835d607ffa87eb7f50552e6cf023d27403 (diff) | |
| download | rust-296f9524f2a27458607529db3f785dc732d79136.tar.gz rust-296f9524f2a27458607529db3f785dc732d79136.zip | |
Rollup merge of #50532 - michaelwoerister:lockless-cnum-map, r=Zoxc
Don't use Lock for heavily accessed CrateMetadata::cnum_map. The `cnum_map` in `CrateMetadata` is used for two things: 1. to map `CrateNums` between crates (used a lot during decoding) 2. to construct the (reverse) post order of the crate graph For the second case, we need to modify the map after the fact, which is why the map is wrapped in a `Lock`. This is bad for the first case, which does not need the modification and does lots of small reads from the map. This PR splits case (2) out into a separate `dependencies` field. This allows to make the `cnum_map` immutable (and shifts the interior mutability to a less busy data structure). Fixes #50502 r? @Zoxc
Diffstat (limited to 'src/test/incremental/thinlto')
0 files changed, 0 insertions, 0 deletions
