-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Use a more efficient iteration order for backward dataflow #62063
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
r? @varkor (rust_highfive has picked a reviewer for you, use r? to override) |
r? @pnkfelix |
@bors try |
⌛ Trying commit 8e31907037a8e96b0b0699402d6251e6629504e1 with merge 64420abf98e4822f5299cc07aabf03f9ca5465d0... |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
fd4ad92
to
a6eb19f
Compare
@bors try |
⌛ Trying commit a6eb19f1bd3992e04b8ae2bb55360b522b6935e4 with merge 062f8b868d47236fa65183c8fedd5de70cbc8eb9... |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
💔 Test failed - checks-travis |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
a6eb19f
to
4773e55
Compare
I'm sorry, I forgot to remove the debug assertion from this one. Can someone trigger another build? |
@bors try |
⌛ Trying commit 4773e5519b989edf4639929feae343ccb43d62e0 with merge 56b7200c037e2a958f7d907e778b87e58beb7079... |
☀️ Try build successful - checks-travis |
@rust-timer build 56b7200c037e2a958f7d907e778b87e58beb7079 |
Success: Queued 56b7200c037e2a958f7d907e778b87e58beb7079 with parent a96ba96, comparison URL. |
Finished benchmarking try commit 56b7200c037e2a958f7d907e778b87e58beb7079, comparison URL. |
This does substantially reduce the number of iterations, it's just that backward dataflow is only used for generators at the moment (I should have checked this before I requested a perf run, although #62062 needed one anyway). Here are the results from running the tests in Before:
After:
|
This seems fine to me. Its currently marked waiting-on-author, but I don't really have much to add as a reviewer. |
This applies the same basic principle as rust-lang#62062 to the reverse dataflow analysis used to compute liveness information. It is functionally equivalent, except that post-order is used instead of reverse post-order. Some `mir::Body`s contain basic blocks which are not reachable from the `START_BLOCK`. We need to add them to the work queue as well to preserve the original semantics.
4773e55
to
e2479e2
Compare
@bors r+ |
📌 Commit e2479e2 has been approved by |
…der, r=nagisa Use a more efficient iteration order for backward dataflow This applies the same basic principle as rust-lang#62062 to the reverse dataflow analysis used to compute liveness information. It is functionally equivalent, except that post-order is used instead of reverse post-order. In the long-term, `BitDenotation` should probably be extended to support both forward and backward dataflow, but there's some more work needed to get to that point.
Rollup of 8 pull requests Successful merges: - #62062 (Use a more efficient iteration order for forward dataflow) - #62063 (Use a more efficient iteration order for backward dataflow) - #62224 (rustdoc: remove unused derives and variants) - #62228 (Extend the #[must_use] lint to boxed types) - #62235 (Extend the `#[must_use]` lint to arrays) - #62239 (Fix a typo) - #62241 (Always parse 'async unsafe fn' + properly ban in 2015) - #62248 (before_exec actually will only get deprecated with 1.37) Failed merges: r? @ghost
This applies the same basic principle as #62062 to the reverse dataflow analysis used to compute liveness information. It is functionally equivalent, except that post-order is used instead of reverse post-order.
In the long-term,
BitDenotation
should probably be extended to support both forward and backward dataflow, but there's some more work needed to get to that point.