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

Separate codegen from metadata #49722

Closed
ishitatsuyuki opened this issue Apr 6, 2018 · 1 comment
Closed

Separate codegen from metadata #49722

ishitatsuyuki opened this issue Apr 6, 2018 · 1 comment
Labels
I-compiletime Issue: Problems and improvements with respect to compile times. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@ishitatsuyuki
Copy link
Contributor

I didn't research deeply on this; if what I said is not applicable please close this.

We currently waits for artefacts of dependencies to be built before building the main crate; however, we don't really need the full optimized code before proceeding to the main crate.

Instead, we can split the step into two: check for code errors and emit metadata, and running the actual codegen (plus linking). This way we can have better parallelism. Taking the rustc codebase for example, we no longer have to block on LLVM optimizing librustc or libsyntax_ext, but instead compile other components in parallel.

How we split this remains to be discussed:

  • If we simply split it to two process invocation, then we need to somehow save the compilation state between them.
  • If we do some kind of IPC with Cargo to inform that the metadata stage is completed, how we should do that should be decided.
  • Both of the solution requires Cargo adaption as well.
@ishitatsuyuki ishitatsuyuki added I-compiletime Issue: Problems and improvements with respect to compile times. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 6, 2018
@ishitatsuyuki
Copy link
Contributor Author

Duplicate of #44587.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-compiletime Issue: Problems and improvements with respect to compile times. 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

1 participant