Couple of refactorings to cg_ssa::base::codegen_crate#97062
Couple of refactorings to cg_ssa::base::codegen_crate#97062bors merged 2 commits intorust-lang:masterfrom
Conversation
There is no reason it needs to be lazily computed at the first iteration of the cgu loop.
This reduces the complexity of this code a lot
|
(rust-highfive has picked a reviewer for you, use r? to override) |
| use rustc_data_structures::fx::FxHashMap; | ||
| use rustc_data_structures::profiling::{get_resident_set_size, print_time_passes_entry}; | ||
|
|
||
| use rustc_data_structures::sync::par_iter; |
There was a problem hiding this comment.
where is par_iter called in cfg(not(parallel_compiler))?
There was a problem hiding this comment.
I think it moved because in other case in will fail to compile, the reason is cfg!(parallel_compiler). If return back #[cfg(parallel_compiler)] all should work (at least i remembering something like that when i touched that part of code here #93787).
There was a problem hiding this comment.
My bad, I didn't see the par_iter call in the hidden section between the diffs.
There was a problem hiding this comment.
I switched from #[cfg] to cfg!() to ensure that changes to the code are always typechecked and not just when explicitly running in the parallel_compiler configuration.
|
@bors r+ |
|
📌 Commit a06deb5 has been approved by |
…mpiler-errors Couple of refactorings to cg_ssa::base::codegen_crate This makes the code simpler and easier to read.
Rollup of 6 pull requests Successful merges: - rust-lang#96866 (Switch CI bucket uploads to intelligent tiering) - rust-lang#97062 (Couple of refactorings to cg_ssa::base::codegen_crate) - rust-lang#97127 (Revert "Auto merge of rust-lang#96441 - ChrisDenton:sync-pipes, r=m-ou-se") - rust-lang#97131 (Improve println! documentation) - rust-lang#97139 (Move some settings DOM generation out of JS) - rust-lang#97152 (Update cargo) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This makes the code simpler and easier to read.