Move SanityCheck and MirPass by nnethercote · Pull Request #129926 · rust-lang/rust (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation4 Commits4 Checks6 Files changed

Conversation

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

[ Show hidden characters]({{ revealButtonHref }})

nnethercote

They are currently in rustc_middle. This PR moves them to rustc_mir_transform, which makes more sense.

r? @cjgillot

@nnethercote

The actual implementation remains in rustc_mir_dataflow, but this commit moves the MirPass impl to rustc_mir_transform and changes it to a MirLint (fixing a FIXME comment).

(I originally tried moving the full implementation from rustc_mir_dataflow but I had some trait problems with HasMoveData and RustcPeekAt and MaybeLiveLocals. This commit was much smaller and simpler, but still will allow some follow-up cleanups.)

@nnethercote

Because that's now the only crate that uses it.

Moving stuff out of rustc_middle is always welcome.

I chose to use impl crate::MirPass/impl crate::MirLint (with explicit crate::) everywhere because that's the only mention of MirPass/MirLint used in all of these files. (Prior to this change, MirPass was mostly imported via use rustc_middle::mir::* items.)

@nnethercote

They're now all just used within this crate.

@nnethercote

@rustbot

Some changes occurred in coverage instrumentation.

cc @Zalathar

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

@rustbot rustbot added 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

Sep 3, 2024

@nnethercote

Best reviewed one commit at a time.

@cjgillot

@bors

📌 Commit 0b2b03c has been approved by cjgillot

It is now in the queue for this repository.

@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

Sep 3, 2024

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request

Sep 3, 2024

@matthiaskrgr

…Pass, r=cjgillot

Move SanityCheck and MirPass

They are currently in rustc_middle. This PR moves them to rustc_mir_transform, which makes more sense.

r? @cjgillot

bors added a commit to rust-lang-ci/rust that referenced this pull request

Sep 3, 2024

@bors

…iaskrgr

Rollup of 9 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

bors added a commit to rust-lang-ci/rust that referenced this pull request

Sep 3, 2024

@bors

bors added a commit to rust-lang-ci/rust that referenced this pull request

Sep 3, 2024

@bors

bors added a commit to rust-lang-ci/rust that referenced this pull request

Sep 4, 2024

@bors

bors added a commit to rust-lang-ci/rust that referenced this pull request

Sep 4, 2024

@bors

bors added a commit to rust-lang-ci/rust that referenced this pull request

Sep 4, 2024

@bors

bors added a commit to rust-lang-ci/rust that referenced this pull request

Sep 4, 2024

@bors

bors added a commit to rust-lang-ci/rust that referenced this pull request

Sep 4, 2024

@bors

rust-timer added a commit to rust-lang-ci/rust that referenced this pull request

Sep 5, 2024

@rust-timer

Rollup merge of rust-lang#129926 - nnethercote:mv-SanityCheck-and-MirPass, r=cjgillot

Move SanityCheck and MirPass

They are currently in rustc_middle. This PR moves them to rustc_mir_transform, which makes more sense.

r? @cjgillot

Labels

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.