From 425fa202c849de5031207c10c13c358eba465dac Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Mon, 9 May 2022 22:47:50 +0900 Subject: [PATCH] Update date references on parallel-rustc (#1348) --- src/parallel-rustc.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/parallel-rustc.md b/src/parallel-rustc.md index 2ee302d24..1714a56ca 100644 --- a/src/parallel-rustc.md +++ b/src/parallel-rustc.md @@ -1,15 +1,15 @@ # Parallel Compilation -As of September 2021, The only stage of the compiler +As of May 2022, The only stage of the compiler that is already parallel is codegen. The nightly compiler implements query evaluation, -but there is still a lot of work to be done. The lack of parallelism at other stages -also represents an opportunity for improving compiler performance. One can try out the current +but there is still a lot of work to be done. The lack of parallelism at other stages +also represents an opportunity for improving compiler performance. One can try out the current parallel compiler work by enabling it in the `config.toml`. -These next few sections describe where and how parallelism is currently used, +These next few sections describe where and how parallelism is currently used, and the current status of making parallel compilation the default in `rustc`. -The underlying thread-safe data-structures used in the parallel compiler +The underlying thread-safe data-structures used in the parallel compiler can be found in the `rustc_data_structures::sync` module. Some of these data structures use the `parking_lot` crate as well. @@ -23,9 +23,9 @@ There are two underlying thread safe data structures used in code generation: - `MetadataRef` -> [`OwningRef, [u8]>`][OwningRef] - This data structure is specific to `rustc`. -During [monomorphization][monomorphization] the compiler splits up all the code to -be generated into smaller chunks called _codegen units_. These are then generated by -independent instances of LLVM running in parallel. At the end, the linker +During [monomorphization][monomorphization] the compiler splits up all the code to +be generated into smaller chunks called _codegen units_. These are then generated by +independent instances of LLVM running in parallel. At the end, the linker is run to combine all the codegen units together into one binary. This process occurs in the `rustc_codegen_ssa::base` module. @@ -49,20 +49,20 @@ When a query `foo` is evaluated, the cache table for `foo` is locked. - If there *is* another query invocation for the same key in progress, we release the lock, and just block the thread until the other invocation has computed the result we are waiting for. This cannot deadlock because, as - mentioned before, query invocations form a DAG. Some thread will always make + mentioned before, query invocations form a DAG. Some threads will always make progress. ## Rustdoc -As of September 2021, there are still a number of steps +As of May 2022, there are still a number of steps to complete before rustdoc rendering can be made parallel. More details on this issue can be found [here][parallel-rustdoc]. ## Current Status -As of July 2021, work on explicitly parallelizing the +As of May 2022, work on explicitly parallelizing the compiler has stalled. There is a lot of design and correctness work that needs -to be done. +to be done. These are the basic ideas in the effort to make `rustc` parallel: @@ -76,7 +76,7 @@ These are the basic ideas in the effort to make `rustc` parallel: [`rayon`]: https://crates.io/crates/rayon -As of February 2021, much of this effort is on hold due +As of May 2022, much of this effort is on hold due to lack of manpower. We have a working prototype with promising performance gains in many cases. However, there are two blockers: