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

Check projection types before inlining MIR #100571

Merged
merged 3 commits into from
Aug 25, 2022
Merged

Conversation

cjgillot
Copy link
Contributor

@cjgillot cjgillot commented Aug 15, 2022

Fixes #100550

I'm very unhappy with this solution, having to duplicate MIR validation code, but at least it removes the ICE.

r? @compiler-errors

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Aug 15, 2022
@rustbot
Copy link
Collaborator

rustbot commented Aug 15, 2022

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 15, 2022
Comment on lines +92 to +95
let ty = ty.fold_with(&mut BottomUpFolder {
tcx,
// FIXME: We erase all late-bound lifetimes, but this is not fully correct.
// If you have a type like `<for<'a> fn(&'a u32) as SomeTrait>::Assoc`,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this relate to the changes in #100121?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This changes exist to avoid ICEing if normalize_erasing_region fails. I think it's orthogonal to your PR.

@cjgillot cjgillot added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Aug 22, 2022
@wesleywiser
Copy link
Member

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

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

bors commented Aug 23, 2022

⌛ Trying commit 911cbae with merge 1c4e6e4106cb1ab7b991b5c0e6499c95a4cc575c...

@bors
Copy link
Contributor

bors commented Aug 24, 2022

☀️ Try build successful - checks-actions
Build commit: 1c4e6e4106cb1ab7b991b5c0e6499c95a4cc575c (1c4e6e4106cb1ab7b991b5c0e6499c95a4cc575c)

@rust-timer
Copy link
Collaborator

Queued 1c4e6e4106cb1ab7b991b5c0e6499c95a4cc575c with parent 060e47f, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (1c4e6e4106cb1ab7b991b5c0e6499c95a4cc575c): comparison URL.

Overall result: ✅ improvements - 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-review -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.

mean1 range count2
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.8% [0.7%, 0.8%] 3
Improvements ✅
(primary)
-0.4% [-0.8%, -0.2%] 115
Improvements ✅
(secondary)
-0.4% [-0.9%, -0.2%] 42
All ❌✅ (primary) -0.4% [-0.8%, -0.2%] 115

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.

mean1 range count2
Regressions ❌
(primary)
3.0% [2.1%, 3.8%] 2
Regressions ❌
(secondary)
3.4% [2.0%, 4.8%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.3% [-6.9%, -1.5%] 3
All ❌✅ (primary) 3.0% [2.1%, 3.8%] 2

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.

mean1 range count2
Regressions ❌
(primary)
2.1% [2.1%, 2.1%] 1
Regressions ❌
(secondary)
2.2% [2.0%, 2.5%] 5
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.1% [2.1%, 2.1%] 1

Footnotes

  1. the arithmetic mean of the percent change 2 3

  2. number of relevant changes 2 3

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Aug 24, 2022
@compiler-errors
Copy link
Member

@bors r+ rollup=never

@bors
Copy link
Contributor

bors commented Aug 24, 2022

📌 Commit 911cbae has been approved by compiler-errors

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 Aug 24, 2022
@bors
Copy link
Contributor

bors commented Aug 25, 2022

⌛ Testing commit 911cbae with merge 4d45b07...

@bors
Copy link
Contributor

bors commented Aug 25, 2022

☀️ Test successful - checks-actions
Approved by: compiler-errors
Pushing 4d45b07 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 25, 2022
@bors bors merged commit 4d45b07 into rust-lang:master Aug 25, 2022
@rustbot rustbot added this to the 1.65.0 milestone Aug 25, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (4d45b07): comparison URL.

Overall result: ❌✅ regressions and improvements - ACTION NEEDED

Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please open an issue or create a new PR that fixes the regressions, add a comment linking to the newly created issue or PR, and then add the perf-regression-triaged label to this PR.

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean1 range count2
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.9% [0.7%, 1.2%] 8
Improvements ✅
(primary)
-0.4% [-1.1%, -0.2%] 115
Improvements ✅
(secondary)
-0.4% [-1.3%, -0.1%] 42
All ❌✅ (primary) -0.4% [-1.1%, -0.2%] 115

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.

mean1 range count2
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
3.5% [3.5%, 3.5%] 1
Improvements ✅
(primary)
-3.1% [-3.2%, -3.0%] 2
Improvements ✅
(secondary)
-2.3% [-2.4%, -2.2%] 2
All ❌✅ (primary) -3.1% [-3.2%, -3.0%] 2

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.

mean1 range count2
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.8% [2.2%, 3.1%] 5
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.7% [-3.4%, -2.0%] 2
All ❌✅ (primary) - - 0

Footnotes

  1. the arithmetic mean of the percent change 2 3

  2. number of relevant changes 2 3

@apiraino
Copy link
Contributor

Beta backport declined in favor of #101004 as per compiler team on Zulip

@rustbot label -beta-nominated

@rustbot rustbot removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Aug 25, 2022
@cjgillot cjgillot deleted the mir-cost-visit branch August 27, 2022 09:14
@rylev
Copy link
Member

rylev commented Aug 30, 2022

All of the regressions are secondary, and many are in the recently noisy deeply-nested-multi. Additionally, the improvements far outweigh the regressions. I think we can mark this as triaged.

@rustbot label: +perf-regression-triaged

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. perf-regression Performance regression. perf-regression-triaged The performance regression has been triaged. 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.

ICE when compiling nalgebra 0.25.4 in Release mode
10 participants