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

move things out of mir/mod.rs #115865

Merged
merged 6 commits into from
Sep 19, 2023
Merged

move things out of mir/mod.rs #115865

merged 6 commits into from
Sep 19, 2023

Conversation

RalfJung
Copy link
Member

@RalfJung RalfJung commented Sep 15, 2023

This moves a bunch of things out of mir/mod.rs:

  • all const-related stuff to a new file consts.rs
  • all statement/place/operand-related stuff to a new file statement.rs
  • all pretty-printing related stuff to pretty.rs

mod.rs started out with 3100 lines and ends up with 1600. :)

Also there was some pretty-printing stuff in terminator.rs, that also got moved to pretty.rs, and I reordered things in pretty.rs so that it can be grouped by functionality.

Only the commit "use pretty_print_const_value from MIR constant 'extra' printing" has any behavior changes; it resolves the issue of having a fancy and a very crude pretty-printer for ConstValue.

r? @oli-obk

@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 15, 2023
@rustbot
Copy link
Collaborator

rustbot commented Sep 15, 2023

This PR changes MIR

cc @oli-obk, @RalfJung, @JakobDegen, @davidtwco, @celinval, @vakaras

@rustbot
Copy link
Collaborator

rustbot commented Sep 16, 2023

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

Some changes might have occurred in exhaustiveness checking

cc @Nadrieril

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

This PR changes Stable MIR

cc @oli-obk, @celinval, @spastorino

Some changes occurred in compiler/rustc_codegen_cranelift

cc @bjorn3

Some changes occurred to the CTFE / Miri engine

cc @rust-lang/miri

Some changes occurred to the CTFE / Miri engine

cc @rust-lang/miri

@RalfJung
Copy link
Member Author

I added two more commits that move things around a bit and clarify a commit; they can be reviewed separately (and they would conflict terribly if I made them a separate PR).

This bitrots quickly so I'd appreciate quick feedback. :)

@bors
Copy link
Contributor

bors commented Sep 18, 2023

☔ The latest upstream changes (presumably #115831) made this pull request unmergeable. Please resolve the merge conflicts.

@RalfJung
Copy link
Member Author

@bors r=oli-obk p=1
(high bitrot risk)

@bors
Copy link
Contributor

bors commented Sep 19, 2023

📌 Commit d14e601 has been approved by oli-obk

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 19, 2023
@bors
Copy link
Contributor

bors commented Sep 19, 2023

⌛ Testing commit d14e601 with merge 794eab8...

bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 19, 2023
move things out of mir/mod.rs

This moves a bunch of things out of `mir/mod.rs`:
- all const-related stuff to a new file consts.rs
- all statement/place/operand-related stuff to a new file statement.rs
- all pretty-printing related stuff to pretty.rs

`mod.rs` started out with 3100 lines and ends up with 1600. :)

Also there was some pretty-printing stuff in terminator.rs, that also got moved to pretty.rs, and I reordered things in pretty.rs so that it can be grouped by functionality.

Only the commit "use pretty_print_const_value from MIR constant 'extra' printing" has any behavior changes; it resolves the issue of having a fancy and a very crude pretty-printer for `ConstValue`.

r? `@oli-obk`
@bors
Copy link
Contributor

bors commented Sep 19, 2023

☀️ Test successful - checks-actions
Approved by: oli-obk
Pushing 794eab8 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Sep 19, 2023
@bors
Copy link
Contributor

bors commented Sep 19, 2023

👀 Test was successful, but fast-forwarding failed: 422 Update is not a fast forward

@RalfJung
Copy link
Member Author

@bors retry

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (794eab8): comparison URL.

Overall result: no relevant changes - no action needed

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

@bors rollup=never
@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
1.8% [1.8%, 1.8%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-4.5% [-4.5%, -4.5%] 1
All ❌✅ (primary) - - 0

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 631.926s -> 631.523s (-0.06%)
Artifact size: 317.94 MiB -> 317.81 MiB (-0.04%)

@RalfJung
Copy link
Member Author

RalfJung commented Sep 19, 2023 via email

@bors
Copy link
Contributor

bors commented Sep 19, 2023

⌛ Testing commit d14e601 with merge 0692db1...

@bors
Copy link
Contributor

bors commented Sep 19, 2023

☀️ Test successful - checks-actions
Approved by: oli-obk
Pushing 0692db1 to master...

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (0692db1): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
2.8% [2.8%, 2.8%] 1
Regressions ❌
(secondary)
1.7% [1.7%, 1.7%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-4.1% [-4.1%, -4.1%] 1
All ❌✅ (primary) 2.8% [2.8%, 2.8%] 1

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
3.6% [3.6%, 3.6%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 631.876s -> 631.446s (-0.07%)
Artifact size: 317.91 MiB -> 317.83 MiB (-0.03%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. 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.

6 participants