3 ms·
My understanding of compilers is somewhat limited, but I'm curious how the compiler can detect "just the portion that changed", given that Rust does heavy inlin
by moosingin3space 10y ago
My understanding of compilers is somewhat limited, but I'm curious how the compiler can detect "just the portion that changed", given that Rust does heavy inlining.
- dikaiosune 10y agoThere's some information about the design in the RFC text: https://github.com/rust-lang/rfcs/blob/master/text/1298-incremental-compilation.md#high-level-design https://github.com/rust-lang/rfcs/blob/master/text/1298-incr... AFAICT, the idea is to track and hash items like function signatures and bodies, map them to the object files produced by LLVM, and to recompile them when the hashes change.
- kibwen 10y agoIndeed, inlining is an obstacle for such fine-grained incremental recompilation as Rust envisions. However, when compiling in debug mode (which is the default) Rust (or rather LLVM) does not do all that much inlining, and considering that people compile in debug mode much more often than they compile in release mode this should present a large time savings to the average developer use case. (Note also that MIR should generate somewhat faster debug binaries than current trans (by virtue of doing "obvious" optimizations in the frontend, rather than asking LLVM to chew on it), so if there are people out there who currently make release builds during development because their debug builds are too doggone slow, then this should help alleviate that.)