rust/compiler/rustc_middle
bors 34c5ab9aac Auto merge of #118227 - Mark-Simulacrum:worker-local-outline, r=cjgillot
Optimize QueryArena allocation

This shifts the WorkerLocal wrapper to be outside the QueryArena, meaning that instead of having each query allocate distinct arenas per-worker we allocate the full set of arenas per-worker. This is primarily a code size optimization (locally, ~85 kilobytes, [perf is reporting >100 kilobytes](https://perf.rust-lang.org/compare.html?start=1fd418f92ed13db88a21865ba5d909abcf16b6cc&end=884c95a3f1fe8d28630ec3cdb0c8f95b2e539fde&stat=instructions%3Au&tab=artifact-size)), saving a bunch of code in the initialization of the arenas which was previously duplicated lots of times (per arena type).

Additionally this tells LLVM that the thread count can't be zero in this code (I believe this is true?) which shaves some small amount of bytes off as well since we eliminate checks for zero in the vec allocations.
2023-11-25 02:01:39 +00:00
..
src Auto merge of #118227 - Mark-Simulacrum:worker-local-outline, r=cjgillot 2023-11-25 02:01:39 +00:00
Cargo.toml Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
messages.ftl Add a custom panic message for resuming gen blocks after they panicked 2023-10-30 10:23:57 +00:00
README.md

For more information about how rustc works, see the rustc dev guide.