-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Simplify the define_query
macro
#100943
Simplify the define_query
macro
#100943
Conversation
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 61d9559b5b175227be74f1610ee8dbc8778b8038 with merge 2c96ac25c27d7e95c062ec4bf1bd937ad27dd441... |
☀️ Try build successful - checks-actions |
Queued 2c96ac25c27d7e95c062ec4bf1bd937ad27dd441 with parent 25ea5a3, future comparison URL. |
Finished benchmarking commit (2c96ac25c27d7e95c062ec4bf1bd937ad27dd441): comparison URL. Overall result: ✅ improvements - no 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. @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.
CyclesThis benchmark run did not return any relevant results for this metric. Footnotes |
it's hard to tell because this contains other changes, but this PR is actually a regression; #100436 had significant improvements that are gone now. I'll rerun perf once that's merged and we can get a less noisy benchmark. |
@@ -300,6 +301,27 @@ pub(crate) fn try_load_from_on_disk_cache<'tcx, K, V>( | |||
} | |||
} | |||
|
|||
pub(crate) fn force_from_dep_node<'tcx, Q>( | |||
tcx: TyCtxt<'tcx>, | |||
// dep_node: rustc_query_system::dep_graph::DepNode<CTX::DepKind>, |
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.
Stray comment.
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.
This is removed in a later commit; I can try and fix the history if you like.
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 5d8015516034c48d59a9c32de04ad3244999ba1c with merge d51cf6c3170ba41ec8eaa42298d63f17bf40dd00... |
💔 Test failed - checks-actions |
e49e169
to
3e72aff
Compare
- Parameterize DepKindStruct over `'tcx` This allows passing in an invariant function pointer in `query_callback`, rather than having to try and make it work for any lifetime. - Add a new `execute_query` function to `QueryDescription` so we can call `tcx.$name` without needing to be in a macro context
3e72aff
to
4e09a13
Compare
@bors r=cjgillot |
☀️ Test successful - checks-actions |
Finished benchmarking commit (e21d771): comparison URL. Overall result: ❌✅ regressions and 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.
Footnotes |
Bootstrap times are noisy as usual, but looks like this cut down a second of compile time for rustc_middle :) |
…r=cjgillot Make `HandleCycleError` an enum instead of a macro-generated closure Helps with rust-lang#96524. Based on rust-lang#100943 to avoid merge conflicts, so it looks larger than it is (only the last commit is relevant). cc https://rust-lang.zulipchat.com/#narrow/stream/241847-t-compiler.2Fwg-incr-comp/topic/Moving.20.60Value.60.20to.20rustc_query_system.20.2396524 r? `@cjgillot`
…cjgillot Make `HandleCycleError` an enum instead of a macro-generated closure Helps with rust-lang#96524. Based on rust-lang#100943 to avoid merge conflicts, so it looks larger than it is (only the last commit is relevant). cc https://rust-lang.zulipchat.com/#narrow/stream/241847-t-compiler.2Fwg-incr-comp/topic/Moving.20.60Value.60.20to.20rustc_query_system.20.2396524 r? `@cjgillot`
Make `HandleCycleError` an enum instead of a macro-generated closure Helps with rust-lang/rust#96524. Based on rust-lang/rust#100943 to avoid merge conflicts, so it looks larger than it is (only the last commit is relevant). cc https://rust-lang.zulipchat.com/#narrow/stream/241847-t-compiler.2Fwg-incr-comp/topic/Moving.20.60Value.60.20to.20rustc_query_system.20.2396524 r? `@cjgillot`
Make `HandleCycleError` an enum instead of a macro-generated closure Helps with rust-lang/rust#96524. Based on rust-lang/rust#100943 to avoid merge conflicts, so it looks larger than it is (only the last commit is relevant). cc https://rust-lang.zulipchat.com/#narrow/stream/241847-t-compiler.2Fwg-incr-comp/topic/Moving.20.60Value.60.20to.20rustc_query_system.20.2396524 r? `@cjgillot`
This moves a bunch of control flow out of the macro into generic functions, leaving the macro just to call the function with a new generic parameter for each query.
It may be possible to improve compile-times / icache by instantiating the generic functions only with the query key, not the query type itself, but I'm going to leave that for a follow-up PR.
Helps with #96524.
r? @cjgillot