Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tracking issue for "Red/Green" Dependency Tracking #42293

Closed
17 tasks done
michaelwoerister opened this issue May 29, 2017 · 2 comments
Closed
17 tasks done

Tracking issue for "Red/Green" Dependency Tracking #42293

michaelwoerister opened this issue May 29, 2017 · 2 comments
Labels
A-incr-comp Area: Incremental compilation C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. metabug Issues about issues themselves ("bugs about bugs") T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@michaelwoerister
Copy link
Member

michaelwoerister commented May 29, 2017

"Red/Green dependency tracking" is what we call the improved tracking algorithm for incremental compilation. The main difference to the algorithm used at the moment is improved accuracy because it can recover from "false positives", that is, it can stop cache invalidation short if a potentially changed value turns out to not have changed after all. A (work-in-progress) description of the system can be found at https://github.com/nikomatsakis/rustc-on-demand-incremental-design-doc/blob/master/0000-rustc-on-demand-and-incremental.md. Implementing this new tracking and caching system will happen in a few phases:

Phase 1 - Red/Green without additional caching

In the first phase the core infrastructure for red/green tracking will be implemented. We do not cache any additional intermediate results but at the end of this phase, we will already have reached peak tracking accuracy.

Phase 2 - Caching ty::TypeckTables

In the second phase, support for caching ty::TypeckTables will be added, which allows the compiler to skip type checking.

Phase 3 - Caching MIR

The third phase will support for caching MIR, which should be straight forward at that point. It remains to be verified though if it actually is a performance gain to do so.

cc @nikomatsakis, @eddyb, and @rust-lang/compiler in general

@michaelwoerister michaelwoerister added A-incr-comp Area: Incremental compilation metabug Issues about issues themselves ("bugs about bugs") T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels May 29, 2017
@Mark-Simulacrum Mark-Simulacrum added the C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. label Jul 27, 2017
bors added a commit that referenced this issue Sep 29, 2017
incr.comp.: Switch to red/green change tracking, remove legacy system.

This PR finally switches incremental compilation to [red/green tracking](#42293) and completely removes the legacy dependency graph implementation -- which includes a few quite costly passes that are simply not needed with the new system anymore.

There's still some documentation to be done and there's certainly still lots of optimizing and tuning ahead -- but the foundation for red/green is in place with this PR. This has been in the making for a long time `:)`

r? @nikomatsakis
cc @alexcrichton, @rust-lang/compiler
bors added a commit that referenced this issue Oct 4, 2017
incr.comp.: Switch to red/green change tracking, remove legacy system.

This PR finally switches incremental compilation to [red/green tracking](#42293) and completely removes the legacy dependency graph implementation -- which includes a few quite costly passes that are simply not needed with the new system anymore.

There's still some documentation to be done and there's certainly still lots of optimizing and tuning ahead -- but the foundation for red/green is in place with this PR. This has been in the making for a long time `:)`

r? @nikomatsakis
cc @alexcrichton, @rust-lang/compiler
@michaelwoerister
Copy link
Member Author

🎉 🎉 🎉 🎉 🎉

@matklad
Copy link
Member

matklad commented Sep 7, 2018

@michaelwoerister could you add a link to https://rust-lang-nursery.github.io/rustc-guide/query.html to the original description? This is what comes up in the search for rust red-green, so it's nice to have links to state-of-the-art docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-incr-comp Area: Incremental compilation C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. metabug Issues about issues themselves ("bugs about bugs") T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants