rust/compiler
bors 9b72cc9abf Auto merge of #115388 - Zoxc:sharded-lock, r=SparrowLii
Add optimized lock methods for `Sharded` and refactor `Lock`

This adds methods to `Sharded` which pick a shard and also locks it. These branch on parallelism just once instead of twice, improving performance.

Benchmark for `cfg(parallel_compiler)` and 1 thread:
<table><tr><td rowspan="2">Benchmark</td><td colspan="1"><b>Before</b></th><td colspan="2"><b>After</b></th></tr><tr><td align="right">Time</td><td align="right">Time</td><td align="right">%</th></tr><tr><td>🟣 <b>clap</b>:check</td><td align="right">1.6461s</td><td align="right">1.6345s</td><td align="right"> -0.70%</td></tr><tr><td>🟣 <b>hyper</b>:check</td><td align="right">0.2414s</td><td align="right">0.2394s</td><td align="right"> -0.83%</td></tr><tr><td>🟣 <b>regex</b>:check</td><td align="right">0.9205s</td><td align="right">0.9143s</td><td align="right"> -0.67%</td></tr><tr><td>🟣 <b>syn</b>:check</td><td align="right">1.4981s</td><td align="right">1.4869s</td><td align="right"> -0.75%</td></tr><tr><td>🟣 <b>syntex_syntax</b>:check</td><td align="right">5.7629s</td><td align="right">5.7256s</td><td align="right"> -0.65%</td></tr><tr><td>Total</td><td align="right">10.0690s</td><td align="right">10.0008s</td><td align="right"> -0.68%</td></tr><tr><td>Summary</td><td align="right">1.0000s</td><td align="right">0.9928s</td><td align="right"> -0.72%</td></tr></table>

cc `@SparrowLii`
2023-09-11 01:43:29 +00:00
..
rustc inline format!() args up to and including rustc_middle 2023-07-30 13:18:33 +02:00
rustc_abi turns out Layout has some more things to worry about -- move ABI comparison into helper function 2023-09-08 09:14:07 +02:00
rustc_arena Bump cfg(bootstrap) 2023-08-23 20:05:14 -04:00
rustc_ast improve AttrTokenStream 2023-09-04 20:07:28 +08:00
rustc_ast_lowering Don't hold the definitions' lock across index_hir 2023-09-02 08:13:07 +02:00
rustc_ast_passes Auto merge of #115131 - frank-king:feature/unnamed-fields-lite, r=petrochenkov 2023-08-24 12:52:35 +00:00
rustc_ast_pretty Auto merge of #115131 - frank-king:feature/unnamed-fields-lite, r=petrochenkov 2023-08-24 12:52:35 +00:00
rustc_attr Auto merge of #114201 - Centri3:explicit-repr-rust, r=WaffleLapkin 2023-08-25 00:02:54 +00:00
rustc_baked_icu_data
rustc_borrowck Auto merge of #115602 - oli-obk:lower_intrinsics, r=petrochenkov 2023-09-07 11:02:54 +00:00
rustc_builtin_macros Load include_bytes! directly into an Lrc 2023-08-27 20:16:19 -04:00
rustc_codegen_cranelift Auto merge of #115418 - Zoxc:freeze-source, r=oli-obk 2023-09-08 17:20:23 +00:00
rustc_codegen_gcc Deduplicate inlined function debug info, but create a new lexical scope to child subsequent scopes and variables from colliding 2023-09-01 14:27:21 -07:00
rustc_codegen_llvm Auto merge of #115685 - matthiaskrgr:rollup-t31gowy, r=matthiaskrgr 2023-09-08 22:47:40 +00:00
rustc_codegen_ssa Auto merge of #115417 - dpaoliello:fixdi, r=wesleywiser 2023-09-08 20:56:01 +00:00
rustc_const_eval Auto merge of #115372 - RalfJung:abi-assert-eq, r=davidtwco 2023-09-08 11:56:08 +00:00
rustc_data_structures Auto merge of #115388 - Zoxc:sharded-lock, r=SparrowLii 2023-09-11 01:43:29 +00:00
rustc_driver Update rustix 2023-07-03 07:20:51 +00:00
rustc_driver_impl Add missing Debuginfo to PDB debug file on windows. 2023-09-08 00:28:40 +02:00
rustc_error_codes Auto merge of #113126 - Bryanskiy:delete_old, r=petrochenkov 2023-09-01 12:40:01 +00:00
rustc_error_messages Bump cfg(bootstrap) 2023-08-23 20:05:14 -04:00
rustc_errors Auto merge of #115418 - Zoxc:freeze-source, r=oli-obk 2023-09-08 17:20:23 +00:00
rustc_expand Bump cfg(bootstrap) 2023-08-23 20:05:14 -04:00
rustc_feature fix version for abi_thiscall to 1.73.0, which was forgotten to change when stabilized 2023-09-01 19:46:09 +03:00
rustc_fluent_macro
rustc_fs_util
rustc_graphviz
rustc_hir replace doc occurrences of ItemLikeVisitor 2023-09-05 22:40:36 +02:00
rustc_hir_analysis E0220: only suggests associated types if there's only one candidate 2023-09-08 08:44:23 +02:00
rustc_hir_pretty Auto merge of #114545 - fee1-dead-contrib:lower-impl-effect, r=oli-obk 2023-08-08 19:23:41 +00:00
rustc_hir_typeck Remove allow_private entirely. 2023-08-29 16:36:13 -07:00
rustc_incremental Avoid a source_span query when encoding Spans into query results 2023-09-08 02:08:52 +02:00
rustc_index Auto merge of #115094 - Mark-Simulacrum:bootstrap-update, r=ozkanonur 2023-08-24 11:10:52 +00:00
rustc_infer Use newtype_index for IntVid and FloatVid. 2023-09-07 17:31:35 +10:00
rustc_interface Use FreezeLock for CStore 2023-09-09 16:02:11 +02:00
rustc_lexer Update lexer emoji diagnostics to Unicode 15.0 2023-07-29 08:47:21 +08:00
rustc_lint Fix ICE in improper_ctypes_definitions lint 2023-09-09 12:30:25 +05:30
rustc_lint_defs Don't emit refining_impl_trait for private items 2023-09-07 01:31:32 +00:00
rustc_llvm Rollup merge of #115358 - durin42:compress-debuginfo, r=oli-obk 2023-09-09 00:28:19 +02:00
rustc_log inline format!() args up to and including rustc_middle 2023-07-30 13:18:33 +02:00
rustc_macros Bump cfg(bootstrap) 2023-08-23 20:05:14 -04:00
rustc_metadata Auto merge of #115306 - tmiasko:encode-reachable-mir, r=cjgillot 2023-09-10 16:31:11 +00:00
rustc_middle Use FreezeLock for CStore 2023-09-09 16:02:11 +02:00
rustc_mir_build Refactor how MIR represents composite debuginfo. 2023-09-05 17:20:07 +00:00
rustc_mir_dataflow Correct comment and assumption. 2023-09-07 15:45:25 +00:00
rustc_mir_transform Auto merge of #115612 - cjgillot:const-prop-int, r=oli-obk 2023-09-08 15:32:54 +00:00
rustc_monomorphize Rollup merge of #115492 - Enselic:large-box-move, r=oli-obk 2023-09-05 07:15:16 +02:00
rustc_parse Rollup merge of #115596 - nnethercote:two-small-changes, r=lqd 2023-09-06 19:31:50 +02:00
rustc_parse_format Replace data_structures dependency with index in rustc_parse_format 2023-09-05 19:11:50 +02:00
rustc_passes Encode only MIR that can be used by other crates 2023-09-10 13:55:33 +02:00
rustc_plugin_impl
rustc_privacy Lint node for PRIVATE_BOUNDS is the item which has the bounds 2023-09-07 06:48:24 +00:00
rustc_query_impl remove some unused crate deps 2023-09-01 19:13:09 +03:00
rustc_query_system Auto merge of #115388 - Zoxc:sharded-lock, r=SparrowLii 2023-09-11 01:43:29 +00:00
rustc_resolve Use FreezeLock for CStore 2023-09-09 16:02:11 +02:00
rustc_serialize Use a specialized varint + bitpacking scheme for DepGraph encoding 2023-09-04 12:16:50 -04:00
rustc_session Auto merge of #115711 - Zoxc:freeze-cstore, r=oli-obk 2023-09-10 11:07:51 +00:00
rustc_smir add function that returns span of an item 2023-09-09 14:17:36 +03:00
rustc_span Auto merge of #115594 - nnethercote:span-tweaks, r=cjgillot 2023-09-09 10:56:24 +00:00
rustc_symbol_mangling Fix CFI: f32 and f64 are encoded incorrectly for c 2023-08-24 21:02:06 -07:00
rustc_target turns out Layout has some more things to worry about -- move ABI comparison into helper function 2023-09-08 09:14:07 +02:00
rustc_trait_selection Don't suggest dereferencing to unsized type 2023-09-07 04:52:00 +00:00
rustc_traits remove some unused crate deps 2023-09-01 19:13:09 +03:00
rustc_transmute Fix error report for size overflow from transmute 2023-09-06 06:48:34 +08:00
rustc_ty_utils Auto merge of #115372 - RalfJung:abi-assert-eq, r=davidtwco 2023-09-08 11:56:08 +00:00
rustc_type_ir Use newtype_index for IntVid and FloatVid. 2023-09-07 17:31:35 +10:00