Uh oh!
There was an error while loading. Please reload this page.
Move most of TyCtxtAt::$name into a generic evaluate_query function - #101178
Move most of TyCtxtAt::$name into a generic evaluate_query function#101178jyn514 wants to merge 2 commits into
TyCtxtAt::$name into a generic evaluate_query function#101178Conversation
jyn514
commented
Aug 30, 2022
@bors try @rust-timer queue (will be noisy because the other PRs results are mixed in, but the other PR was mostly neutral) |
rust-timer
commented
Aug 30, 2022
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
bors
commented
Aug 30, 2022
⌛ Trying commit 945c5aa1c444ce371df6331df39b15e0695132bd with merge 3a9c65e699f299095772bc2c587402acc7dfa3cb... |
This comment has been minimized.
This comment has been minimized.
bors
commented
Aug 30, 2022
💔 Test failed - checks-actions |
This comment has been minimized.
This comment has been minimized.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
bors
commented
Sep 1, 2022
☔ The latest upstream changes (presumably #100869) made this pull request unmergeable. Please resolve the merge conflicts. |
91a5a06 to
c1584faComparecjgillot
commented
Sep 2, 2022
@bors try @rust-timer queue |
rust-timer
commented
Sep 2, 2022
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
bors
commented
Sep 2, 2022
⌛ Trying commit c1584fa72d4b55f73511e40558fc3b209551563e with merge cc5741e85142c1055aaecb2ce088feb90a8b5ab8... |
bors
commented
Sep 2, 2022
☀️ Try build successful - checks-actions |
rust-timer
commented
Sep 2, 2022
Queued cc5741e85142c1055aaecb2ce088feb90a8b5ab8 with parent 9353538, future comparison URL. |
rust-timer
commented
Sep 2, 2022
Finished benchmarking commit (cc5741e85142c1055aaecb2ce088feb90a8b5ab8): comparison URL. Overall result: ❌ regressions - ACTION NEEDEDBenchmarking 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. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @bors rollup=never Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis 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.
CyclesResultsThis 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.
Footnotes |
bors
commented
Sep 7, 2022
⌛ Trying commit 3d9e006874c1230a89ea43942f314ce5ba23f8f4 with merge 43ab395f7c492c9ec65610e092ad26cb9879373e... |
jyn514
commented
Sep 7, 2022
It will be a shame to have to add back OnHit but I can do so if it improves perf. |
jyn514
commented
Sep 7, 2022
I can also split d2c53ca to a separate PR to rule out any perf impact, I'll do that this evening. |
bors
commented
Sep 7, 2022
☀️ Try build successful - checks-actions |
cjgillot
commented
Sep 8, 2022
@rust-timer build 43ab395f7c492c9ec65610e092ad26cb9879373e |
rust-timer
commented
Sep 8, 2022
Queued 43ab395f7c492c9ec65610e092ad26cb9879373e with parent e7c7aa7, future comparison URL. |
rust-timer
commented
Sep 8, 2022
Finished benchmarking commit (43ab395f7c492c9ec65610e092ad26cb9879373e): comparison URL. Overall result: ❌✅ regressions and improvements - ACTION NEEDEDBenchmarking 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. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @bors rollup=never Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis 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.
CyclesResultsThis 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.
Footnotes |
…ly returning Option I think `copy` may have added some overhead? unclear what's causing the perf impact.
jyn514
commented
Sep 10, 2022
If this doesn't work, I think I may just close the PR; this seems like unnecessarily much work for how little duplication it removes. |
jyn514
commented
Sep 10, 2022
@bors try @rust-timer queue |
rust-timer
commented
Sep 10, 2022
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
bors
commented
Sep 10, 2022
⌛ Trying commit 3675fdd with merge 9c9dde98c61b16603a24ce49807ef1c314a751d2... |
bors
commented
Sep 10, 2022
☀️ Try build successful - checks-actions |
rust-timer
commented
Sep 10, 2022
Queued 9c9dde98c61b16603a24ce49807ef1c314a751d2 with parent 1d37ed6, future comparison URL. |
rust-timer
commented
Sep 10, 2022
Finished benchmarking commit (9c9dde98c61b16603a24ce49807ef1c314a751d2): comparison URL. Overall result: ❌ regressions - ACTION NEEDEDBenchmarking 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. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @bors rollup=never Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis 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.
CyclesResultsThis 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.
Footnotes |
…llot Move `Queries::new` out of the macro Split out from rust-lang#101178 to make sure it's not contributing to the perf impact. r? `@cjgillot`
| #[inline(always)] | ||
| fn copy<T: Copy>(x: &T) -> T { | ||
| *x | ||
| fn evaluate_query<'tcx, Cache>( |
There was a problem hiding this comment.
Did you try this with #[inline(always)]? The callers all have that so this should regress without it.
Helps with #96524. This is based on #100943, so it looks larger than it is.
Queries::newout of thedefine_callbacksmacro. This is a very small cleanup, happy to move it to its own PR.TyCtxtAt::$nameinto a generic function. There were a couple different approaches I could have taken here, see https://rust-lang.zulipchat.com/#narrow/stream/241847-t-compiler.2Fwg-incr-comp/topic/making.20.60TyCtxtAt.3A.3A.24query.60.20generic.20.2396524. I chose to use aQueryCachegeneric type argument and pass intcx.query_caches.$nameinstead of doing a much larger refactor to definequeries::$namein rustc_middle instead of rustc_query_impl.OnHitgeneric parameter totry_get_cached. It was always used withcopyafter my refactor.r? @cjgillot