EDIT(Centril): The crate was renamed to rustc_middle in #70536.
EDIT(jyn514): Most of rustc_middle was split into rustc_query_impl in #70951.
The results from @ehuss's new cargo -Ztimings feature really drive home how the size of the rustc crate hurts compile times for the compiler. Here's a picture:

Things to note.
- The
rustc crate takes about twice as long to compile as the rustc_mir crate, which is the second-biggest crate.
- Sixteen dependent crates start and finish their entire compilation while the
rustc crate's codegen is happening. (Thank goodness for pipelining, it really makes a difference in this case.)
- Almost 1/3 of the total build time occurs while building the
rustc crate without anything else happening in parallel (from 42-67s, and from 141-174s).
Also, even doing check builds on rustc code is painful. On my fast 28-core Linux box it takes 10-15 seconds even for the first compile error to come up. This is much longer than other crates. Refactorings within the rustc crate that require many edit/compile cycles are painful.
I've been told that rustc is quite tangled and splitting it up could be difficult. That may well be true. The good news is that the picture shows we don't need to split it into 10 equal-sized pieces to get benefits. Even splitting off small chunks into separate crates will have an outsized effect on compilation times.
EDIT(Centril): The crate was renamed to
rustc_middlein #70536.EDIT(jyn514): Most of rustc_middle was split into
rustc_query_implin #70951.The results from @ehuss's new

cargo -Ztimingsfeature really drive home how the size of therustccrate hurts compile times for the compiler. Here's a picture:Things to note.
rustccrate takes about twice as long to compile as therustc_mircrate, which is the second-biggest crate.rustccrate's codegen is happening. (Thank goodness for pipelining, it really makes a difference in this case.)rustccrate without anything else happening in parallel (from 42-67s, and from 141-174s).Also, even doing
checkbuilds onrustccode is painful. On my fast 28-core Linux box it takes 10-15 seconds even for the first compile error to come up. This is much longer than other crates. Refactorings within therustccrate that require many edit/compile cycles are painful.I've been told that
rustcis quite tangled and splitting it up could be difficult. That may well be true. The good news is that the picture shows we don't need to split it into 10 equal-sized pieces to get benefits. Even splitting off small chunks into separate crates will have an outsized effect on compilation times.