Clarify the role of the PreCodegen dummy pass#156358
Conversation
|
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 |
|
r? @mati865 rustbot has assigned @mati865. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
I'm not familiar with that area, so the changes look neutral to me. Perhaps somebody familiar with the area should review it? @bors r? rust-lang/wg-mir-opt |
|
Unknown command "r?". Run |
|
Error: Parsing assign command in comment failed: ...'commands. Please file an issue on GitHub at triagebot if there's a problem with this bot, or reach out on #triagebot on Zulip. |
This comment has been minimized.
This comment has been minimized.
This function doesn't have an obvious home, but there's little reason for it to be in `rustc_mir_transform`, and having it in `rustc_driver_impl::pretty` at least puts it near other callers of `write_mir_pretty`.
|
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. |
| &dump_mir::Marker("PreCodegen"), | ||
| // Dummy pass to allow dumping the final pre-codegen MIR for testing/debugging. | ||
| // This must be the final pass! | ||
| &marker::PreCodegen, |
There was a problem hiding this comment.
I think the name should still include somewhere that this pass just dumps
|
Is this pass still useful ? We now dump a file called |
|
We have a bunch of mir-opt tests that currently mention PreCodegen, but if those can all be converted to use runtime-optimized then we should potentially be able to just remove PreCodegen. |
The existing comments for this pass are somewhat confusing.
The
PreCodegenpass does nothing by itself. It exists so that-Zdump-mir(and mir-opt tests) can easily dump the final pre-codegen MIR, by dumping the input or output of PreCodegen, which happens to be run after all other passes are finished.