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

Remove allow(rustc::potential_query_instability) from rustc_ast_lowering #104330

Merged
merged 4 commits into from
Nov 18, 2022

Conversation

CastilloDel
Copy link
Contributor

Related to #84447.

@cjgillot Thanks for helping me!

@rustbot
Copy link
Collaborator

rustbot commented Nov 12, 2022

r? @fee1-dead

(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 Nov 12, 2022
@rust-log-analyzer

This comment has been minimized.

@cjgillot cjgillot self-assigned this Nov 12, 2022
self.owners[def_id] = info;
if let hir::MaybeOwner::NonOwner(_) = self.owners[def_id] {
self.owners[def_id] = info;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

The logic is reversed here.
Phantom means nothing has been assigned yet.
An Owner can overwrite a NonOwner, and a NonOwner does not overwrite to an Owner.
If we try to overwrite an Owner with an Owner, or a NonOwner with a NonOwner, that's a bug.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is it better now?

Copy link
Contributor

Choose a reason for hiding this comment

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

Actually, as the test suite passes with the debug assert just above, let's keep the simple assignment there was originally. Sorry for the back-and-forth.

@cjgillot
Copy link
Contributor

Just in case:
@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 Nov 13, 2022
@bors
Copy link
Contributor

bors commented Nov 13, 2022

⌛ Trying commit 6c711ad6a9d5ae66ddd63eb4ff8eb48e4ec886f6 with merge f3caf91746d059764528a52ecc05c4498425a7ff...

@bors
Copy link
Contributor

bors commented Nov 13, 2022

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

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (f3caf91746d059764528a52ecc05c4498425a7ff): comparison URL.

Overall result: ❌✅ regressions and 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.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
1.3% [1.3%, 1.3%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.3% [-0.4%, -0.3%] 2
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)
- - 0
Improvements ✅
(primary)
-1.4% [-2.0%, -0.9%] 2
Improvements ✅
(secondary)
-1.8% [-1.8%, -1.8%] 1
All ❌✅ (primary) -1.4% [-2.0%, -0.9%] 2

Cycles

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

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Nov 13, 2022
@CastilloDel
Copy link
Contributor Author

CastilloDel commented Nov 14, 2022

A regression in a secondary benchmark doesn't seem so bad. I will change the Vec to a SmallVec to test if the performance improves.

Request a benchmark, please!

@cjgillot
Copy link
Contributor

@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 Nov 14, 2022
@bors
Copy link
Contributor

bors commented Nov 14, 2022

⌛ Trying commit 8d360aa80121fcaff4196ada0e92bbefca933b5d with merge b781f49a47f316f7a4763b82f0fe195a4677a72a...

Copy link
Contributor

@cjgillot cjgillot left a comment

Choose a reason for hiding this comment

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

One nit, r=me on the best of Vec/SmallVec.

self.owners[def_id] = info;
if let hir::MaybeOwner::NonOwner(_) = self.owners[def_id] {
self.owners[def_id] = info;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Actually, as the test suite passes with the debug assert just above, let's keep the simple assignment there was originally. Sorry for the back-and-forth.

compiler/rustc_ast_lowering/src/item.rs Outdated Show resolved Hide resolved
@bors
Copy link
Contributor

bors commented Nov 14, 2022

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

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (b781f49a47f316f7a4763b82f0fe195a4677a72a): 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-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.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.2% [0.1%, 0.2%] 2
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.4% [1.4%, 3.4%] 4
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.5% [-2.1%, -0.9%] 2
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)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.5% [-2.5%, -2.5%] 1
Improvements ✅
(secondary)
-2.1% [-2.1%, -2.1%] 1
All ❌✅ (primary) -2.5% [-2.5%, -2.5%] 1

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Nov 14, 2022
@CastilloDel
Copy link
Contributor Author

Not sure which one is best overall. The two improvements we had before are gone, and now we have one more regression, but they are smaller. Should we try another SmallVec size? and if not which version should we use?

@cjgillot
Copy link
Contributor

Not sure which one is best overall. The two improvements we had before are gone, and now we have one more regression, but they are smaller. Should we try another SmallVec size? and if not which version should we use?

The Vec version was good enough. Picking over fractions of a percent over 2 benchmarks is not worth it.

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Nov 15, 2022
@Manishearth
Copy link
Member

@bors p=1

going to close the tree for non-nevers for a while so they can drain out

@bors
Copy link
Contributor

bors commented Nov 17, 2022

⌛ Testing commit 5572263 with merge 80ac74d4fc73147a5458c9580a8e40651c379363...

@bors
Copy link
Contributor

bors commented Nov 17, 2022

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 17, 2022
@CastilloDel
Copy link
Contributor Author

I don't understand the error :/

@rust-log-analyzer
Copy link
Collaborator

The job armhf-gnu failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
---- [ui] src/test/ui/array-slice-vec/box-of-array-of-drop-2.rs stdout ----

error: test run failed!
status: exit status: 101
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/remote-test-client" "run" "0" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/array-slice-vec/box-of-array-of-drop-2/a"
--- stdout -------------------------------
uploaded "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/array-slice-vec/box-of-array-of-drop-2/a", waiting for result
--- stderr -------------------------------
thread 'main' panicked at 'client.into_inner() failed with Connection reset by peer (os error 104)', src/tools/remote-test-client/src/main.rs:306:22
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
------------------------------------------

@cjgillot
Copy link
Contributor

@bors retry

@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 Nov 17, 2022
@bors
Copy link
Contributor

bors commented Nov 17, 2022

⌛ Testing commit 5572263 with merge c0bec3a826c1ac2582c6d9c2912efab71a5762ba...

@bors
Copy link
Contributor

bors commented Nov 18, 2022

💥 Test timed out

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 18, 2022
@rust-log-analyzer
Copy link
Collaborator

A job failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@cjgillot
Copy link
Contributor

@bors retry

@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 Nov 18, 2022
@bors
Copy link
Contributor

bors commented Nov 18, 2022

⌛ Testing commit 5572263 with merge fd3bfb3...

@bors
Copy link
Contributor

bors commented Nov 18, 2022

☀️ Test successful - checks-actions
Approved by: cjgillot
Pushing fd3bfb3 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Nov 18, 2022
@bors bors merged commit fd3bfb3 into rust-lang:master Nov 18, 2022
@rustbot rustbot added this to the 1.67.0 milestone Nov 18, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (fd3bfb3): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -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
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.6% [-1.3%, -0.3%] 6
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.5% [0.5%, 0.5%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-4.6% [-4.6%, -4.6%] 1
All ❌✅ (primary) 0.5% [0.5%, 0.5%] 1

Cycles

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

Aaron1011 pushed a commit to Aaron1011/rust that referenced this pull request Jan 6, 2023
Remove allow(rustc::potential_query_instability) from rustc_ast_lowering

Related to rust-lang#84447.

`@cjgillot` Thanks for helping me!
@CastilloDel CastilloDel deleted the ast_lowering branch January 28, 2023 20:05
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.

8 participants