-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 QueryEngine
trait
#109611
Remove QueryEngine
trait
#109611
Conversation
These commits modify the If this was intentional then you can ignore this comment. Some changes occurred to the CTFE / Miri engine cc @rust-lang/miri |
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
⌛ Trying commit 6ff4ec38724688fe2d03e6042a44db705454e11d with merge e917dc60af05173dcd1ddae988d3f4bd9ae00fab... |
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (e917dc60af05173dcd1ddae988d3f4bd9ae00fab): 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.
|
// FIXME: This doesn't encode `did` directly due to some trait specialization error. | ||
encode_def_id(did, encoder); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please include more information about the failure in the comment, as well as the code this should be so it gets addressed in the future
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had a look locally and found that using function syntax instead of method syntax works. I pushed the fix directly to your branch
Please have a look at the perf regressions with cachegrind. They seem ok, but we should at least make an attempt at resolving them. the change itself lgtm. |
It's not easy to read anything useful from cachegrind with lots of inlining differences and function renaming. I added inlining attributes to compensate for the |
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
⌛ Trying commit b1ae7398814387a28fae32f91a0ee4d82d243eb0 with merge 0f23ca9ea2278f1bd63917535c55886c928388b4... |
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (0f23ca9ea2278f1bd63917535c55886c928388b4): 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.
|
bitmaps seems to be a wall time improvement locally:
|
r? @cjgillot |
☔ The latest upstream changes (presumably #96840) made this pull request unmergeable. Please resolve the merge conflicts. |
☔ The latest upstream changes (presumably #110648) made this pull request unmergeable. Please resolve the merge conflicts. |
☔ The latest upstream changes (presumably #110778) made this pull request unmergeable. Please resolve the merge conflicts. |
☔ The latest upstream changes (presumably #110634) made this pull request unmergeable. Please resolve the merge conflicts. |
@bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (f5adff6): comparison URL. Overall result: ✅ improvements - no action needed@rustbot label: -perf-regression 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.
|
This removes the
QueryEngine
trait andQueries
fromrustc_query_impl
and replaced them with function pointers and fields inQuerySystem
. As a side effectOnDiskCache
is moved back intorustc_middle
and theOnDiskCache
trait is also removed.This has a couple of benefits.
TyCtxt
is used in the query system instead of the removedQueryCtxt
which is larger.__rust_end_short_backtrace
to avoid some overhead. For Specialize query execution for incremental and non-incremental #108062 it avoids the duplicateQueryEngine
structs.QueryContext
now implementsDepContext
which avoids manydep_context()
calls inrustc_query_system
.rustc_driver
size is reduced by 0.33%, hopefully that means some bootstrap improvements.QueryEngine
trait.r? @cjgillot