Remove the dummy PreCodegen mir-opt pass, and use runtime-optimized instead#156524
Open
Zalathar wants to merge 3 commits into
Open
Remove the dummy PreCodegen mir-opt pass, and use runtime-optimized instead#156524Zalathar wants to merge 3 commits into
PreCodegen mir-opt pass, and use runtime-optimized instead#156524Zalathar wants to merge 3 commits into
Conversation
This function doesn't have an obvious home, but there's little reason for it to be in mir-transform, and having it in `rustc_driver_impl::pretty` at least puts it near other callers of `write_mir_pretty`.
Collaborator
|
These commits modify the If this was unintentional then you should revert the changes before this PR is merged. Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt |
This comment has been minimized.
This comment has been minimized.
MIR dumped before/after the dummy `PreCodegen` pass should be identical to MIR dumped after the phase transition to `runtime-optimized`.
This dummy pass is not needed, because the `runtime-optimized` phase transition can be used to dump the final pre-codegen MIR.
oli-obk
approved these changes
May 13, 2026
Member
Author
|
PR CI is green. @bors r=oli-obk |
Contributor
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
May 13, 2026
Remove the dummy `PreCodegen` mir-opt pass, and use `runtime-optimized` instead - Alternative to rust-lang#156358. The `PreCodegen` pass doesn't do anything on its own; it was only serving as a marker to allow `-Zdump-mir` and mir-opt tests to easily dump the final MIR just before codegen. However, rust-lang#156358 (comment) pointed out that the `runtime-optimized` phase transition should dump the same MIR, so there shouldn't be any need for a separate *PreCodegen* pass. --- r? oli-obk (or compiler)
rust-bors Bot
pushed a commit
that referenced
this pull request
May 13, 2026
…uwer Rollup of 5 pull requests Successful merges: - #156472 (Add support for Zprint-codegen-stats-json) - #156504 (bootstrap: remap windows-style OUT_DIR paths) - #156513 (miri subtree update) - #156524 (Remove the dummy `PreCodegen` mir-opt pass, and use `runtime-optimized` instead) - #156325 (Don't treat const param default as projection)
rust-bors Bot
pushed a commit
that referenced
this pull request
May 13, 2026
…uwer Rollup of 5 pull requests Successful merges: - #156472 (Add support for Zprint-codegen-stats-json) - #156504 (bootstrap: remap windows-style OUT_DIR paths) - #156513 (miri subtree update) - #156524 (Remove the dummy `PreCodegen` mir-opt pass, and use `runtime-optimized` instead) - #156325 (Don't treat const param default as projection)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PreCodegendummy pass #156358.The
PreCodegenpass doesn't do anything on its own; it was only serving as a marker to allow-Zdump-mirand mir-opt tests to easily dump the final MIR just before codegen.However, #156358 (comment) pointed out that the
runtime-optimizedphase transition should dump the same MIR, so there shouldn't be any need for a separate PreCodegen pass.r? oli-obk (or compiler)