Skip to content

Replace CodegenResults with CompiledModules#153184

Merged
rust-bors[bot] merged 3 commits intorust-lang:mainfrom
bjorn3:split_crate_info_out_of_codegen_results
Mar 3, 2026
Merged

Replace CodegenResults with CompiledModules#153184
rust-bors[bot] merged 3 commits intorust-lang:mainfrom
bjorn3:split_crate_info_out_of_codegen_results

Conversation

@bjorn3
Copy link
Member

@bjorn3 bjorn3 commented Feb 27, 2026

This is already CodegenResults without CrateInfo. The driver can calculate the CrateInfo and pass it by-ref to the backend. Using CompiledModules makes it a bit easier to move some other things out of the backend as will be necessary for moving LTO to the link phase.

Helps with rust-lang/compiler-team#908

@rustbot
Copy link
Collaborator

rustbot commented Feb 27, 2026

Some changes occurred in compiler/rustc_codegen_gcc

cc @antoyo, @GuillaumeGomez

@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Feb 27, 2026
@rustbot
Copy link
Collaborator

rustbot commented Feb 27, 2026

r? @nnethercote

rustbot has assigned @nnethercote.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: codegen, compiler
  • codegen, compiler expanded to 68 candidates
  • Random selection from 15 candidates

@rust-log-analyzer

This comment has been minimized.

@bjorn3 bjorn3 force-pushed the split_crate_info_out_of_codegen_results branch from 515588b to 468fabe Compare February 27, 2026 14:38
@rust-log-analyzer

This comment has been minimized.

@bjorn3 bjorn3 force-pushed the split_crate_info_out_of_codegen_results branch from 323e729 to a2b70c1 Compare February 27, 2026 15:54
@rust-log-analyzer

This comment has been minimized.

bjorn3 added 3 commits March 2, 2026 16:39
In preparation for fully replacing CodegenResults with CompiledModules.
This is already CodegenResults without CrateInfo. The driver can
calculate the CrateInfo and pass it by-ref to the backend. Using
CompiledModules makes it a bit easier to move some other things out of
the backend as will be necessary for moving LTO to the link phase.
@bjorn3 bjorn3 force-pushed the split_crate_info_out_of_codegen_results branch from a2b70c1 to 5aa980e Compare March 2, 2026 16:40
@rustbot
Copy link
Collaborator

rustbot commented Mar 2, 2026

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

Copy link
Contributor

@nnethercote nnethercote left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me once the question below is answered.

View changes since this review

@@ -1,3 +1,5 @@
error: crate `rmeta_meta` required to be available in rlib format, but was not found in this form
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does this happen?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rmeta_meta is compiled with --emit=metadata, while this test crate isn't. As such this error should have been emitted before, but didn't as we aborted before computing the dependency formats due to the codegen failure.

@nnethercote nnethercote added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 3, 2026
@bjorn3
Copy link
Member Author

bjorn3 commented Mar 3, 2026

@bors r=nnethercote

@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 3, 2026

📌 Commit 5aa980e has been approved by nnethercote

It is now in the queue for this repository.

@rust-bors rust-bors bot 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 3, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Mar 3, 2026
…egen_results, r=nnethercote

Replace CodegenResults with CompiledModules

This is already CodegenResults without CrateInfo. The driver can calculate the CrateInfo and pass it by-ref to the backend. Using CompiledModules makes it a bit easier to move some other things out of the backend as will be necessary for moving LTO to the link phase.

Helps with rust-lang/compiler-team#908
rust-bors bot pushed a commit that referenced this pull request Mar 3, 2026
…uwer

Rollup of 4 pull requests

Successful merges:

 - #152164 (Lint unused features)
 - #152943 (Parse `impl` restrictions)
 - #153184 (Replace CodegenResults with CompiledModules)
 - #153319 (Comments and docs: add missing periods to "ie.")
rust-bors bot pushed a commit that referenced this pull request Mar 3, 2026
…uwer

Rollup of 6 pull requests

Successful merges:

 - #153336 (stdarch subtree update)
 - #152943 (Parse `impl` restrictions)
 - #153184 (Replace CodegenResults with CompiledModules)
 - #153285 (Update call-llvm-intrinsics test for Rust 1.94.0 IR)
 - #153319 (Comments and docs: add missing periods to "ie.")
 - #153326 (Make `rustc_with_all_queries!` pass query modifiers as named values)
@rust-bors rust-bors bot merged commit ee8e2df into rust-lang:main Mar 3, 2026
11 checks passed
@rustbot rustbot added this to the 1.96.0 milestone Mar 3, 2026
rust-timer added a commit that referenced this pull request Mar 3, 2026
Rollup merge of #153184 - bjorn3:split_crate_info_out_of_codegen_results, r=nnethercote

Replace CodegenResults with CompiledModules

This is already CodegenResults without CrateInfo. The driver can calculate the CrateInfo and pass it by-ref to the backend. Using CompiledModules makes it a bit easier to move some other things out of the backend as will be necessary for moving LTO to the link phase.

Helps with rust-lang/compiler-team#908
@bjorn3 bjorn3 deleted the split_crate_info_out_of_codegen_results branch March 3, 2026 15:23
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Mar 4, 2026
…uwer

Rollup of 6 pull requests

Successful merges:

 - rust-lang/rust#153336 (stdarch subtree update)
 - rust-lang/rust#152943 (Parse `impl` restrictions)
 - rust-lang/rust#153184 (Replace CodegenResults with CompiledModules)
 - rust-lang/rust#153285 (Update call-llvm-intrinsics test for Rust 1.94.0 IR)
 - rust-lang/rust#153319 (Comments and docs: add missing periods to "ie.")
 - rust-lang/rust#153326 (Make `rustc_with_all_queries!` pass query modifiers as named values)
github-actions bot pushed a commit to rust-lang/rust-analyzer that referenced this pull request Mar 5, 2026
…uwer

Rollup of 6 pull requests

Successful merges:

 - rust-lang/rust#153336 (stdarch subtree update)
 - rust-lang/rust#152943 (Parse `impl` restrictions)
 - rust-lang/rust#153184 (Replace CodegenResults with CompiledModules)
 - rust-lang/rust#153285 (Update call-llvm-intrinsics test for Rust 1.94.0 IR)
 - rust-lang/rust#153319 (Comments and docs: add missing periods to "ie.")
 - rust-lang/rust#153326 (Make `rustc_with_all_queries!` pass query modifiers as named values)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. 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.

4 participants