-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Reduce duplication of RPO calculation of mir #96500
Conversation
r? @fee1-dead (rust-highfive has picked a reviewer for you, use r? to override) |
r? rust-lang/compiler |
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit e302207a194f1a8ceb6092d5732911ebabebcbd5 with merge fe490c7fc5b49eedb0d44da3e67d066f001aa4e7... |
☀️ Try build successful - checks-actions |
Queued fe490c7fc5b49eedb0d44da3e67d066f001aa4e7 with parent 71cd460, future comparison URL. |
I don't know anything about this code, so rerolling. |
Finished benchmarking commit (fe490c7fc5b49eedb0d44da3e67d066f001aa4e7): comparison url. Summary:
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. 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 Footnotes |
The MIR Body API computes some information on demand and caches the result, e.g., |
That makes sense! I thought about this before too, but didn't try given that mir would be changed frequently. But with reference to these implementation, invalidating them when getting the mutable reference of mir is a good solution. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There is a logical problem with the current implementation.(If the |
@bors try @rust-timer queue |
@bors r=tmiasko |
1 similar comment
@bors r=tmiasko |
📌 Commit 78e969e275b82c8a5ef5fbfc2d78544dd9a6b8f3 has been approved by |
Could you also squash all the commits? To avoid having commits with changes that are immediately reverted or fixed by subsequent commit. @bors r- |
add `postorder_cache` to mir Body add `ReversePostorderCache` struct correct struct name and comments
sure |
@bors r+ |
📌 Commit 7149bbc has been approved by |
⌛ Testing commit 7149bbc with merge c88089caaff7dfe5766a8326eb562e7c6aa1ba57... |
💔 Test failed - checks-actions |
@bors retry Could not resolve host: ci-mirrors.rust-lang.org |
☀️ Test successful - checks-actions |
Finished benchmarking commit (9a98c63): comparison url. Summary:
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression Footnotes |
Computing the RPO of mir is not a low-cost thing, but it is duplicate in many places. In particular the
iterate_to_fixpoint
method which is called multiple times when computing the data flow.This PR reduces the number of times the RPO is recalculated as much as possible, which should save some compile time.