Uh oh!
There was an error while loading. Please reload this page.
Query-ify global limit attribute handling - #86674
Conversation
Aaron1011
commented
Jun 27, 2021
@bors try @rust-timer queue |
rust-timer
commented
Jun 27, 2021
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
bors
commented
Jun 27, 2021
⌛ Trying commit bfd7c7bb2b2a2c681a0c1ad00eee713d94e0010e with merge d606f2fd5e1ab800c6f9c463b1d637e2c9d884bf... |
bors
commented
Jun 27, 2021
☀️ Try build successful - checks-actions |
rust-timer
commented
Jun 27, 2021
Queued d606f2fd5e1ab800c6f9c463b1d637e2c9d884bf with parent 49ba936, future comparison URL. |
rust-timer
commented
Jun 27, 2021
Finished benchmarking try commit (d606f2fd5e1ab800c6f9c463b1d637e2c9d884bf): comparison url. Summary: This benchmark run did not return any significant changes. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. Please note that if the perf results are neutral, you should likely undo the rollup=never given below by specifying Importantly, though, if the results of this run are non-neutral do not roll this PR up -- it will mask other regressions or improvements in the roll up. @bors rollup=never |
rustbot
commented
Jun 27, 2021
Error: Label perf-regression can only be set by Rust team members Please let |
Aaron1011
commented
Jun 27, 2021
michaelwoerister
commented
Jun 30, 2021
Thanks for the PR, @Aaron1011! I'll take a closer look shortly. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
michaelwoerister
commented
Jun 30, 2021
OK, overall this looks good to me. Getting things out of Some remarks:
|
michaelwoerister
commented
Jun 30, 2021
@rylev, potential problem with performance regression bot above: #86674 (comment) |
rylev
commented
Jun 30, 2021
@michaelwoerister thanks! This has been fixed in #86687 |
Aaron1011
commented
Jun 30, 2021
I think the granularity could potentially make a difference - for example, changing the |
bfd7c7b to
9a6cd1aCompareAaron1011
commented
Jun 30, 2021
@bors try @rust-timer queue |
rust-timer
commented
Jun 30, 2021
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
bors
commented
Jun 30, 2021
⌛ Trying commit 9a6cd1a0d5a1db64b502d849edde2d9888f8b9ec with merge 27b275a44087f0a094822f466836c4503ba6a229... |
bors
commented
Jun 30, 2021
☀️ Try build successful - checks-actions |
rust-timer
commented
Jun 30, 2021
Finished benchmarking try commit (27b275a44087f0a094822f466836c4503ba6a229): comparison url. Summary: This change led to significant improvements 🎉 in compiler performance.
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. Please note that if the perf results are neutral, you should likely undo the rollup=never given below by specifying Importantly, though, if the results of this run are non-neutral do not roll this PR up -- it will mask other regressions or improvements in the roll up. @bors rollup=never |
Uh oh!
There was an error while loading. Please reload this page.
michaelwoerister
commented
Jul 2, 2021
Thanks for implementing the optimizations, @Aaron1011! I doesn't look like they made a huge difference but I think it's a good idea to have them anyway.
Yes, that's true. However, my thinking was that one very rarely adjusts those limits and thus this is a good trade-off between code readability and compile-time. |
9a6cd1a to
7e5a88aCompareAaron1011
commented
Jul 4, 2021
@bors try @rust-timer queue |
rust-timer
commented
Jul 4, 2021
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
bors
commented
Jul 4, 2021
⌛ Trying commit 7e5a88a with merge 14d9c8245e32b898bc02bf215c498b682881f5d7... |
bors
commented
Jul 4, 2021
☀️ Try build successful - checks-actions |
rust-timer
commented
Jul 4, 2021
Queued 14d9c8245e32b898bc02bf215c498b682881f5d7 with parent 9044245, future comparison URL. |
rust-timer
commented
Jul 4, 2021
Finished benchmarking try commit (14d9c8245e32b898bc02bf215c498b682881f5d7): comparison url. Summary: This benchmark run did not return any significant changes. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. @bors rollup=never |
michaelwoerister
commented
Jul 5, 2021
OK, bundling the queries together didn't seem to make a difference performance-wise. But I think the code looks cleaner at the usage sites this way. Heads up performance triage: This PR introduces a slight regression in some incr. comp. cases because it fixes a dependency tracking hole and thus introduces some new tracking overhead. @Aaron1011 has already tried to optimize away some of that overhead as part of the PR, with limited effect unfortunately. But even if the overhead is here to stay, I think it is justified because it removes a potential source bugs. Thanks for iterating on the PR, @Aaron1011! @bors r+ |
bors
commented
Jul 5, 2021
📌 Commit 7e5a88a has been approved by |
bors
commented
Jul 5, 2021
bors
commented
Jul 5, 2021
☀️ Test successful - checks-actions |
Currently, we read various 'global limits' from inner attributes the crate root (
recursion_limit,move_size_limit,type_length_limit,const_eval_limit). These limits are then stored inSessions, allowing them to be access from aTyCtxtwithout registering a dependency on the crate root attributes.This PR moves the calculation of these global limits behind queries, so that we properly track dependencies on crate root attributes. During the setup of macro expansion (before we've created a
TyCtxt), we need to access the recursion limit, which is now done by directly calling into the code shared by the normal query implementations.