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

Normalize types and consts in MIR opts. #110714

Merged
merged 2 commits into from
Apr 24, 2023
Merged

Conversation

cjgillot
Copy link
Contributor

Some passes were using a non-RevealAll param_env, which is needlessly restrictive in mir-opts.

As a drive-by, we normalize all constants, since just normalizing their types is not enough.

@rustbot
Copy link
Collaborator

rustbot commented Apr 23, 2023

r? @oli-obk

(rustbot has picked a reviewer for you, use r? to override)

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

rustbot commented Apr 23, 2023

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

@oli-obk
Copy link
Contributor

oli-obk commented Apr 23, 2023

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Apr 23, 2023
@bors
Copy link
Contributor

bors commented Apr 23, 2023

⌛ Trying commit 4fe5136 with merge 29598da8b5f9d3359d6c501b375cf0e4b89b4b87...

@bors
Copy link
Contributor

bors commented Apr 23, 2023

☀️ Try build successful - checks-actions
Build commit: 29598da8b5f9d3359d6c501b375cf0e4b89b4b87 (29598da8b5f9d3359d6c501b375cf0e4b89b4b87)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (29598da8b5f9d3359d6c501b375cf0e4b89b4b87): comparison URL.

Overall result: ❌ regressions - 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 is a highly reliable metric that was used to determine the overall result at the top of this comment.

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

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)
2.7% [2.3%, 3.2%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

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)
2.4% [2.4%, 2.4%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-4.4% [-4.7%, -4.1%] 2
All ❌✅ (primary) 2.4% [2.4%, 2.4%] 1

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Apr 24, 2023
@oli-obk
Copy link
Contributor

oli-obk commented Apr 24, 2023

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Apr 24, 2023

📌 Commit 4fe5136 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 Apr 24, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 24, 2023
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#110255 (Suggest using integration tests for test crate using own proc-macro)
 - rust-lang#110514 (Remove `find_map_relevant_impl`)
 - rust-lang#110566 (Don't create projection ty for const projection)
 - rust-lang#110637 (Group some sections of our logs in github actions)
 - rust-lang#110706 (Add `intrinsics::transmute_unchecked`)
 - rust-lang#110714 (Normalize types and consts in MIR opts.)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 2ce9b57 into rust-lang:master Apr 24, 2023
@rustbot rustbot added this to the 1.71.0 milestone Apr 24, 2023
@cjgillot cjgillot deleted the reveal-consts branch April 24, 2023 21:01
@JakobDegen
Copy link
Contributor

@cjgillot can we also run the reveal_all pass unconditionally? Is there a reason we shouldn't?

@cjgillot
Copy link
Contributor Author

I thought it was already on by default 🤦. No reason we shouldn't.

bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 11, 2023
Reveal opaque types before drop elaboration

fixes rust-lang#113594

r? `@cjgillot`

cc `@JakobDegen`

This pass was introduced in rust-lang#110714

I moved it before drop elaboration (which only cares about the hidden types of things, not the opaque TAIT or RPIT type) and set it to run unconditionally (instead of depending on the optimization level and whether the inliner is active)
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 29, 2023
Reveal opaque types before drop elaboration

fixes rust-lang#113594

r? `@cjgillot`

cc `@JakobDegen`

This pass was introduced in rust-lang#110714

I moved it before drop elaboration (which only cares about the hidden types of things, not the opaque TAIT or RPIT type) and set it to run unconditionally (instead of depending on the optimization level and whether the inliner is active)
RalfJung pushed a commit to RalfJung/miri that referenced this pull request Sep 30, 2023
Reveal opaque types before drop elaboration

fixes rust-lang/rust#113594

r? `@cjgillot`

cc `@JakobDegen`

This pass was introduced in rust-lang/rust#110714

I moved it before drop elaboration (which only cares about the hidden types of things, not the opaque TAIT or RPIT type) and set it to run unconditionally (instead of depending on the optimization level and whether the inliner is active)
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.

6 participants