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

Various refactors to the incr comp workproduct handling #97058

Merged
merged 5 commits into from
Jun 7, 2022

Conversation

bjorn3
Copy link
Member

@bjorn3 bjorn3 commented May 15, 2022

This is the result of me looking into adding support for having multiple object files for a single codegen unit to incr comp. This is necessary to support inline assembly in cg_clif without requiring partial linking which is not supported on Windows and seems to fail on macOS for some reason. Cg_clif uses an external assembler to handle inline asm and thus produces one object file with regular functions and one object file containing compiled inline asm for each codegen unit which uses inline asm. Current incr comp can't handle this. This PR doesn't yet add support for this, but it makes it easier to do so.

@bjorn3 bjorn3 added C-cleanup Category: PRs that clean code up or issues documenting cleanup. A-codegen Area: Code generation labels May 15, 2022
@rust-highfive
Copy link
Collaborator

Some changes occured to rustc_codegen_cranelift

cc @bjorn3

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label May 15, 2022
@rust-highfive
Copy link
Collaborator

r? @nagisa

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 15, 2022
@nagisa
Copy link
Member

nagisa commented Jun 5, 2022

@bors r+

Although it would have been nice if some of the commits (e.g. 81f7325) specified why this change makes sense (“this function only ever returns work products from a previous compilation session” or something) in the description.

@bors
Copy link
Contributor

bors commented Jun 5, 2022

📌 Commit e11d448a8d338b74d6793a4bf6d5683e32aa6553 has been approved by nagisa

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 5, 2022
@bors
Copy link
Contributor

bors commented Jun 5, 2022

⌛ Testing commit e11d448a8d338b74d6793a4bf6d5683e32aa6553 with merge 1672ba7726f18446d16f9031e5eb429f14acb910...

@bors
Copy link
Contributor

bors commented Jun 5, 2022

💥 Test timed out

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jun 5, 2022
@nagisa
Copy link
Member

nagisa commented Jun 5, 2022

Perfect opportunity to address the comments above. r=me after.

This is a tiny optimization
It returns the previous work product or panics if there is none. This rename
makes the purpose of this method clearer.
@bjorn3 bjorn3 force-pushed the multi_artifact_work_products branch from e11d448 to 9145fcc Compare June 6, 2022 12:37
A WorkProduct without a saved file is useless
@bjorn3 bjorn3 force-pushed the multi_artifact_work_products branch from 9145fcc to e16c3b4 Compare June 6, 2022 12:40
@bjorn3
Copy link
Member Author

bjorn3 commented Jun 6, 2022

Rebased, added rationale to commit messages and applied @klensy's suggestions.

@bors r=nagisa

@bors
Copy link
Contributor

bors commented Jun 6, 2022

📌 Commit e16c3b4 has been approved by nagisa

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 6, 2022
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Jun 7, 2022
…, r=nagisa

Various refactors to the incr comp workproduct handling

This is the result of me looking into adding support for having multiple object files for a single codegen unit to incr comp. This is necessary to support inline assembly in cg_clif without requiring partial linking which is not supported on Windows and seems to fail on macOS for some reason. Cg_clif uses an external assembler to handle inline asm and thus produces one object file with regular functions and one object file containing compiled inline asm for each codegen unit which uses inline asm. Current incr comp can't handle this. This PR doesn't yet add support for this, but it makes it easier to do so.
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 7, 2022
Rollup of 5 pull requests

Successful merges:

 - rust-lang#97058 (Various refactors to the incr comp workproduct handling)
 - rust-lang#97301 (Allow unstable items to be re-exported unstably without requiring the feature be enabled)
 - rust-lang#97738 (Fix ICEs from zsts within unsized types with non-zero offsets)
 - rust-lang#97771 (Remove SIGIO reference on Haiku)
 - rust-lang#97808 (Add some unstable target features for the wasm target codegen)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit ab1027a into rust-lang:master Jun 7, 2022
@rustbot rustbot added this to the 1.63.0 milestone Jun 7, 2022
@bjorn3 bjorn3 deleted the multi_artifact_work_products branch June 7, 2022 15:31
JohnTitor pushed a commit to JohnTitor/rust that referenced this pull request Jul 26, 2022
Rollup of 5 pull requests

Successful merges:

 - rust-lang#97058 (Various refactors to the incr comp workproduct handling)
 - rust-lang#97301 (Allow unstable items to be re-exported unstably without requiring the feature be enabled)
 - rust-lang#97738 (Fix ICEs from zsts within unsized types with non-zero offsets)
 - rust-lang#97771 (Remove SIGIO reference on Haiku)
 - rust-lang#97808 (Add some unstable target features for the wasm target codegen)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-codegen Area: Code generation C-cleanup Category: PRs that clean code up or issues documenting cleanup. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants