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

(almost) Always use ObligationCtxt when dealing with canonical queries #103590

Merged
merged 3 commits into from
Nov 1, 2022

Conversation

compiler-errors
Copy link
Member

Hope this is a step in the right direction. cc rust-lang/types-team#50.

r? @lcnr

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Oct 26, 2022
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 26, 2022
@compiler-errors
Copy link
Member Author

@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 Oct 26, 2022
@bors
Copy link
Contributor

bors commented Oct 26, 2022

⌛ Trying commit 0bd6683576648fb55e3e0f2922a0c837feb5063b with merge bccb473edab682d162577ee3f8421ab566842732...

@bors
Copy link
Contributor

bors commented Oct 26, 2022

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

@rust-timer
Copy link
Collaborator

Queued bccb473edab682d162577ee3f8421ab566842732 with parent 0a6b941, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (bccb473edab682d162577ee3f8421ab566842732): 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
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.9% [-1.1%, -0.7%] 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.

mean1 range count2
Regressions ❌
(primary)
1.4% [1.4%, 1.4%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.9% [-0.9%, -0.9%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.2% [-0.9%, 1.4%] 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)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-5.8% [-5.9%, -5.7%] 2
All ❌✅ (primary) - - 0

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 Oct 27, 2022
Copy link
Contributor

@lcnr lcnr left a comment

Choose a reason for hiding this comment

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

❤️

further improvements, then r=me

compiler/rustc_traits/src/type_op.rs Outdated Show resolved Hide resolved
compiler/rustc_traits/src/type_op.rs Outdated Show resolved Hide resolved
Comment on lines 199 to +193
let Normalized { value, obligations } =
infcx.at(&ObligationCause::dummy(), param_env).normalize(value)?;
fulfill_cx.register_predicate_obligations(infcx, obligations);
ocx.infcx.at(&ObligationCause::dummy(), param_env).normalize(value)?;
ocx.register_obligations(obligations);
Copy link
Contributor

Choose a reason for hiding this comment

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

ocx.normalize

Copy link
Member Author

Choose a reason for hiding this comment

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

ocx.normalize has different semantics than infcx.normalize though -- it doesn't return an error when it failed to normalize.

compiler/rustc_traits/src/type_op.rs Outdated Show resolved Hide resolved
@lcnr
Copy link
Contributor

lcnr commented Oct 27, 2022

@bors r+

@bors
Copy link
Contributor

bors commented Oct 27, 2022

📌 Commit 2f9794b has been approved by lcnr

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 Oct 27, 2022
@bors
Copy link
Contributor

bors commented Nov 1, 2022

⌛ Testing commit 2f9794b with merge e70cbef...

@bors
Copy link
Contributor

bors commented Nov 1, 2022

☀️ Test successful - checks-actions
Approved by: lcnr
Pushing e70cbef to master...

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

Finished benchmarking commit (e70cbef): comparison URL.

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

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.2% [1.6%, 2.9%] 6
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.6% [2.3%, 2.8%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Cycles

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

@rustbot rustbot added the perf-regression Performance regression. label Nov 1, 2022
@nnethercote
Copy link
Contributor

This might just be noise, but I'm not certain. Either way, it's just one of the secondary benchmarks, so a regression wouldn't matter much.

@rustbot label: +perf-regression-triaged

@rustbot rustbot added the perf-regression-triaged The performance regression has been triaged. label Nov 1, 2022
@compiler-errors compiler-errors deleted the ocx-more branch November 2, 2022 02:52
Aaron1011 pushed a commit to Aaron1011/rust that referenced this pull request Jan 6, 2023
(almost) Always use `ObligationCtxt` when dealing with canonical queries

Hope this is a step in the right direction. cc rust-lang/types-team#50.

r? `@lcnr`
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.

7 participants