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

rustc_mir_transform cleanups #129738

Merged
merged 13 commits into from
Sep 2, 2024

Conversation

nnethercote
Copy link
Contributor

A bunch of small improvements I made while looking closely at this code.

r? @saethlin

@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 Aug 29, 2024
@rustbot
Copy link
Collaborator

rustbot commented Aug 29, 2024

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

@nnethercote
Copy link
Contributor Author

Best reviewed one commit at a time.

No reason to have two of them listed separately, after modules.
For more concise code.
They are almost identical, differing only in the `ProjectionElem` they
insert. This commit merges them into a new type `SelfArgVisitor`.
These are just renamings of `CoroutineArgs` constants.
@saethlin
Copy link
Member

There are clippy lints for some of these cases, though I don't think I'd actually run them because in general I find clippy to be too picky to enforce.

But I'm happy to see improvements like this. r=me, so you can squash if you want. Or address ^

@nnethercote
Copy link
Contributor Author

nnethercote commented Sep 1, 2024

I just need approval for the final commit here now (Avoid repeated interning in SelfArgVisitor.).

@cjgillot
Copy link
Contributor

cjgillot commented Sep 1, 2024

@bors r+

@bors
Copy link
Contributor

bors commented Sep 1, 2024

📌 Commit ac7a293 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 1, 2024
@nnethercote
Copy link
Contributor Author

@bors rollup

bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 2, 2024
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#127474 (doc: Make block of inline Deref methods foldable)
 - rust-lang#129678 (Deny imports of `rustc_type_ir::inherent` outside of type ir + new trait solver)
 - rust-lang#129738 (`rustc_mir_transform` cleanups)
 - rust-lang#129793 (add extra linebreaks so rustdoc can identify the first sentence)
 - rust-lang#129804 (Fixed some typos in the standard library documentation/comments)
 - rust-lang#129837 (Actually parse stdout json, instead of using hacky contains logic.)
 - rust-lang#129842 (Fix LLVM ABI NAME for riscv64imac-unknown-nuttx-elf)
 - rust-lang#129843 (Mark myself as on vacation for triagebot)
 - rust-lang#129858 (Replace walk with visit so we dont skip outermost expr kind in def collector)

Failed merges:

 - rust-lang#129777 (Add `unreachable_pub`, round 4)
 - rust-lang#129868 (Remove kobzol vacation status)

r? `@ghost`
`@rustbot` modify labels: rollup
workingjubilee added a commit to workingjubilee/rustc that referenced this pull request Sep 2, 2024
…eanups, r=cjgillot

`rustc_mir_transform` cleanups

A bunch of small improvements I made while looking closely at this code.

r? ``@saethlin``
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 2, 2024
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#127474 (doc: Make block of inline Deref methods foldable)
 - rust-lang#129678 (Deny imports of `rustc_type_ir::inherent` outside of type ir + new trait solver)
 - rust-lang#129738 (`rustc_mir_transform` cleanups)
 - rust-lang#129793 (add extra linebreaks so rustdoc can identify the first sentence)
 - rust-lang#129804 (Fixed some typos in the standard library documentation/comments)
 - rust-lang#129837 (Actually parse stdout json, instead of using hacky contains logic.)
 - rust-lang#129842 (Fix LLVM ABI NAME for riscv64imac-unknown-nuttx-elf)
 - rust-lang#129843 (Mark myself as on vacation for triagebot)
 - rust-lang#129858 (Replace walk with visit so we dont skip outermost expr kind in def collector)

Failed merges:

 - rust-lang#129777 (Add `unreachable_pub`, round 4)
 - rust-lang#129868 (Remove kobzol vacation status)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 2, 2024
…kingjubilee

Rollup of 11 pull requests

Successful merges:

 - rust-lang#127021 (Add target support for RTEMS Arm)
 - rust-lang#127474 (doc: Make block of inline Deref methods foldable)
 - rust-lang#129624 (Adjust `memchr` pinning and run `cargo update`)
 - rust-lang#129678 (Deny imports of `rustc_type_ir::inherent` outside of type ir + new trait solver)
 - rust-lang#129738 (`rustc_mir_transform` cleanups)
 - rust-lang#129793 (add extra linebreaks so rustdoc can identify the first sentence)
 - rust-lang#129804 (Fixed some typos in the standard library documentation/comments)
 - rust-lang#129837 (Actually parse stdout json, instead of using hacky contains logic.)
 - rust-lang#129842 (Fix LLVM ABI NAME for riscv64imac-unknown-nuttx-elf)
 - rust-lang#129843 (Mark myself as on vacation for triagebot)
 - rust-lang#129858 (Replace walk with visit so we dont skip outermost expr kind in def collector)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 2, 2024
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#127474 (doc: Make block of inline Deref methods foldable)
 - rust-lang#129678 (Deny imports of `rustc_type_ir::inherent` outside of type ir + new trait solver)
 - rust-lang#129738 (`rustc_mir_transform` cleanups)
 - rust-lang#129793 (add extra linebreaks so rustdoc can identify the first sentence)
 - rust-lang#129804 (Fixed some typos in the standard library documentation/comments)
 - rust-lang#129837 (Actually parse stdout json, instead of using hacky contains logic.)
 - rust-lang#129842 (Fix LLVM ABI NAME for riscv64imac-unknown-nuttx-elf)
 - rust-lang#129843 (Mark myself as on vacation for triagebot)
 - rust-lang#129858 (Replace walk with visit so we dont skip outermost expr kind in def collector)

Failed merges:

 - rust-lang#129777 (Add `unreachable_pub`, round 4)
 - rust-lang#129868 (Remove kobzol vacation status)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 2, 2024
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#127474 (doc: Make block of inline Deref methods foldable)
 - rust-lang#129678 (Deny imports of `rustc_type_ir::inherent` outside of type ir + new trait solver)
 - rust-lang#129738 (`rustc_mir_transform` cleanups)
 - rust-lang#129793 (add extra linebreaks so rustdoc can identify the first sentence)
 - rust-lang#129804 (Fixed some typos in the standard library documentation/comments)
 - rust-lang#129837 (Actually parse stdout json, instead of using hacky contains logic.)
 - rust-lang#129842 (Fix LLVM ABI NAME for riscv64imac-unknown-nuttx-elf)
 - rust-lang#129843 (Mark myself as on vacation for triagebot)
 - rust-lang#129858 (Replace walk with visit so we dont skip outermost expr kind in def collector)

Failed merges:

 - rust-lang#129777 (Add `unreachable_pub`, round 4)
 - rust-lang#129868 (Remove kobzol vacation status)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit dce2665 into rust-lang:master Sep 2, 2024
6 checks passed
@rustbot rustbot added this to the 1.83.0 milestone Sep 2, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Sep 2, 2024
Rollup merge of rust-lang#129738 - nnethercote:rustc_mir_transform-cleanups, r=cjgillot

`rustc_mir_transform` cleanups

A bunch of small improvements I made while looking closely at this code.

r? `@saethlin`
@nnethercote nnethercote deleted the rustc_mir_transform-cleanups branch September 3, 2024 00:12
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Sep 9, 2024
…eanups-2, r=cjgillot

`rustc_mir_transform` cleanups, round 2

More cleanups in the style of rust-lang#129738.

r? `@cjgillot`
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Sep 9, 2024
…eanups-2, r=cjgillot

`rustc_mir_transform` cleanups, round 2

More cleanups in the style of rust-lang#129738.

r? ``@cjgillot``
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Sep 9, 2024
Rollup merge of rust-lang#129929 - nnethercote:rustc_mir_transform-cleanups-2, r=cjgillot

`rustc_mir_transform` cleanups, round 2

More cleanups in the style of rust-lang#129738.

r? ``@cjgillot``
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants