rust/compiler/rustc_codegen_ssa
Tyson Nottingham 29711d8c96 rustc_codegen_ssa: tune codegen scheduling to reduce memory usage
For better throughput during parallel processing by LLVM, we used to sort
CGUs largest to smallest. This would lead to better thread utilization
by, for example, preventing a large CGU from being processed last and
having only one LLVM thread working while the rest remained idle.

However, this strategy would lead to high memory usage, as it meant the
LLVM-IR for all of the largest CGUs would be resident in memory at once.

Instead, we can compromise by ordering CGUs such that the largest and
smallest are first, second largest and smallest are next, etc. If there
are large size variations, this can reduce memory usage significantly.
2021-02-03 18:55:05 -08:00
..
src rustc_codegen_ssa: tune codegen scheduling to reduce memory usage 2021-02-03 18:55:05 -08:00
Cargo.toml rustc_codegen_ssa: tune codegen scheduling to reduce memory usage 2021-02-03 18:55:05 -08:00
README.md

Please read the rustc-dev-guide chapter on Backend Agnostic Codegen.