Skip to content

Move maybe_loop_headers out of rustc_middle.#155026

Open
nnethercote wants to merge 1 commit intorust-lang:mainfrom
nnethercote:mv-maybe_loop_headers
Open

Move maybe_loop_headers out of rustc_middle.#155026
nnethercote wants to merge 1 commit intorust-lang:mainfrom
nnethercote:mv-maybe_loop_headers

Conversation

@nnethercote
Copy link
Copy Markdown
Contributor

rustc_middle is enormous and it's always good to move things out of it where possible. maybe_loop_headers is easy to move because it has a single use in jump_threading.rs.

r? @WaffleLapkin

`rustc_middle` is enormous and it's always good to move things out of it
where possible. `maybe_loop_headers` is easy to move because it has a
single use in `jump_threading.rs`.
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 9, 2026

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 Apr 9, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 9, 2026

WaffleLapkin is not on the review rotation at the moment.
They may take a while to respond.

@dianqk
Copy link
Copy Markdown
Member

dianqk commented Apr 9, 2026

I created the loop module because GVN used maybe_loop_headers, which was later removed. I think the loop module will be useful for future loop analyses that haven't yet been implemented.

@nnethercote
Copy link
Copy Markdown
Contributor Author

YAGNI always applies, but if we ignore that -- could the module be in rustc_mir_transform instead of rustc_middle?

@dianqk
Copy link
Copy Markdown
Member

dianqk commented Apr 9, 2026

YAGNI always applies, but if we ignore that -- could the module be in rustc_mir_transform instead of rustc_middle?

Yeah. It could be in rustc_mir_transform.

r? me
@bors r+ rollup=always

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 9, 2026

📌 Commit 6352e82 has been approved by dianqk

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-review Status: Awaiting review from the assignee but also interested parties. labels Apr 9, 2026
@rustbot rustbot assigned dianqk and unassigned WaffleLapkin Apr 9, 2026
jhpratt added a commit to jhpratt/rust that referenced this pull request Apr 9, 2026
… r=dianqk

Move `maybe_loop_headers` out of `rustc_middle`.

`rustc_middle` is enormous and it's always good to move things out of it where possible. `maybe_loop_headers` is easy to move because it has a single use in `jump_threading.rs`.

r? @WaffleLapkin
rust-bors bot pushed a commit that referenced this pull request Apr 9, 2026
Rollup of 3 pull requests

Successful merges:

 - #153038 (core::sync: rename `Exclusive` to `SyncView` and make improvements)
 - #154955 (Fix pattern types rendering in rustdoc)
 - #155026 (Move `maybe_loop_headers` out of `rustc_middle`.)
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.

4 participants