Skip to content

Commit e71fe2d

Browse files
committed
Modify project suggestion
1 parent 6cdd011 commit e71fe2d

File tree

1 file changed

+21
-19
lines changed

1 file changed

+21
-19
lines changed

README.md

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ We use the GSoC project size parameters for estimating the expected time complex
2828
- [Bootstrap of rustc with rustc_codegen_gcc](#Bootstrap-of-rustc-with-rustc_codegen_gcc)
2929
- [Refactoring of rustc_codegen_ssa to make it more convenient for the GCC codegen](#Refactoring-of-rustc_codegen_ssa-to-make-it-more-convenient-for-the-GCC-codegen)
3030
- [ABI/Layout handling for the automatic differentiation feature](#abilayout-handling-for-the-automatic-differentiation-feature)
31-
- [Promoting Parallel Front End](#Promoting-Parallel-Front-End)
31+
- [Improving parallel frontend](#improving-parallel-frontend)
3232
- **Infrastructure**
3333
- [Implement merge functionality in bors](#implement-merge-functionality-in-bors)
3434
- [Improve bootstrap](#Improve-bootstrap)
@@ -295,45 +295,46 @@ Medium to hard.
295295
**Zulip streams**
296296
- [Idea discussion](https://rust-lang.zulipchat.com/#narrow/channel/390790-wg-autodiff)
297297

298-
### Promoting-Parallel-Front-End
298+
### Improving parallel frontend
299299

300300
**Description**
301301

302302
Improving compiler performance has always been a focus of the Rust community and one of the main tasks of the compiler team. [Parallelization](https://rustc-dev-guide.rust-lang.org/parallel-rustc.html) of rust compiler is an important and effective approach.
303-
Currently, the backend end (codegen part) of the compiler has been parallelized, which has brought a huge improvement in the performance of the compiler. However, there is still much room for improvement in the parallelization of the rust front end.
303+
Currently, the backend end (codegen part) of the compiler has been parallelized, which has brought a huge improvement in the performance of the compiler. However, there is still much room for improvement in the parallelization of the rust frontend.
304304

305-
The most important and valuable work are two aspects:
305+
The most important and valuable work in this area are two aspects:
306306

307-
A) Deadlock [issues](https://github.com/rust-lang/rust/issues?q=is%3Aopen+label%3AWG-compiler-parallel+deadlock) caused by the execution order of compiler queries in a multithreaded environment.
307+
A) Diagnosing and fixing deadlock [issues](https://github.com/rust-lang/rust/issues?q=is%3Aopen+label%3AWG-compiler-parallel+deadlock) caused by the execution order of compiler queries in a multithreaded environment.
308308
[Queries](https://rustc-dev-guide.rust-lang.org/query.html) is a unique design of the Rust compiler, which is used to achieve incremental compilation process. It divides the compiler
309-
process into various parts and caches the execution results of each part. However, queries cache dependencies between multiple threads may cause deadlock.
310-
[`work-stealing`](https://en.wikipedia.org/wiki/Work_stealing), a method used to improve parallelization performance, is the core reason.
309+
process into various parts and caches the execution results of each part. However, queries caching dependencies between multiple threads may cause deadlock.
310+
[`Work-stealing`](https://en.wikipedia.org/wiki/Work_stealing), a method used to improve parallelization performance, is the core reason.
311311

312-
To solve these problems, we need to find the part of the compiler process that causes deadlock through the diagnostics and core dump in issues, and adjust the execution order
313-
of this part so that there will be no circular dependency on the query caches between multiple threads. This [PR](https://github.com/rust-lang/rust/pull/118488) is a good example of solving a deadlock problem.
312+
To solve these problems, we need to find the part of the compiler process that causes deadlock through diagnosing coredumps in issues, and adjusting the execution order
313+
of this part of code so that there will be no circular dependencies on the query caches between multiple threads. This [PR](https://github.com/rust-lang/rust/pull/118488) is a good example of solving a deadlock problem.
314314

315-
B) Improving the performance of parallel front end
316-
i) The parallel front end has implemented parallelization in typeck, mir borrow check and other parts. However, there is still a lot of room for improvement:
315+
B) Improving the performance of the parallel frontend
316+
The parallel frontend has implemented parallelization in type checking, MIR borrow checking and other parts of the compiler. However, there is still a lot of room for improvement:
317317
- HIR lowering. Modifying the array structure of `tcx.untracked.definitions` so that it can be accessed efficiently in multiple threads is likely to be the key.
318-
- macro expansion. How to deal with the order problem of name resolution during macro expansion is a difficult point.
319-
- lex parsing.
318+
- Macro expansion. How to deal with the order problem of name resolution during macro expansion is a difficult problem.
319+
- Lexing and/or parsing.
320320

321321
Achieving the above goals is of big significance to improving the performance of the Rust compiler.
322322

323+
The project could choose either one of these two areas, or try to tackle both of them together.
324+
323325
**Expected result**
324326

325-
Parallel front-end will not cause deadlock problems. We can ensure usability through [UI testing](https://github.com/rust-lang/rust/pull/132051).
327+
Parallel frontend will not cause deadlock issues. We can ensure usability through [UI testing](https://github.com/rust-lang/rust/pull/132051).
326328

327-
The parallel front-end can currently achieve full compilation, and 8 threads can reduce the compilation time by more than 20% compared to a single thread.
328-
Our goal is to increase it to more than 30%. We can test it through the rustc-perf tool.
329+
The performance of the compiler will be improved, ideally at least by a couple of percentage points.
329330

330331
**Desirable skills**
331332

332-
Need a certain understanding of the implementation of the compiler process(such as typeck, hir_lowering, macro expansion).
333+
Intermediate knowledge of Rust. A basic understanding of the implementation of the compiler process (such as typeck, hir_lowering, macro expansion) would be ideal.
333334

334335
**Project size**
335336

336-
Medium
337+
Medium to hard (depending on the chosen scope).
337338

338339
**Difficulty**
339340

@@ -343,7 +344,8 @@ Medium to hard.
343344
- Sparrow Li ([GitHub](https://github.com/SparrowLii), [Zulip](https://rust-lang.zulipchat.com/#narrow/dm/353056-Sparrow-Li))
344345

345346
**Zulip streams**
346-
- [Zulip channel](https://rust-lang.zulipchat.com/#narrow/channel/187679-t-compiler.2Fwg-parallel-rustc)
347+
- Idea discussion (TODO)
348+
- [Parallel frontend working group](https://rust-lang.zulipchat.com/#narrow/channel/187679-t-compiler.2Fwg-parallel-rustc)
347349

348350
## Infrastructure
349351

0 commit comments

Comments
 (0)