about summary refs log tree commit diff
path: root/src/test/rustdoc-ui/coverage/basic.rs
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-06-30 21:57:22 +0200
committerGitHub <noreply@github.com>2019-06-30 21:57:22 +0200
commit543c4648bd2028672d091cec378a50034c8709a0 (patch)
tree16fc04064e9db91b985f21b7fb17ead864277f42 /src/test/rustdoc-ui/coverage/basic.rs
parent0af8e872ea5ac77effa59f8d3f8794f12cb8865c (diff)
parent07c5e2b310bf20fdccedc6a927f1417cb9ddc7fa (diff)
downloadrust-543c4648bd2028672d091cec378a50034c8709a0.tar.gz
rust-543c4648bd2028672d091cec378a50034c8709a0.zip
Rollup merge of #62062 - ecstatic-morse:dataflow-order, r=nagisa
Use a more efficient iteration order for forward dataflow

Currently, dataflow begins by visiting each block in order of ID (`BasicBlock(0)`, `BasicBlock(1)`, etc.). This PR changes that initial iteration to reverse post-order (see [this blog post](https://eli.thegreenplace.net/2015/directed-graph-traversal-orderings-and-applications-to-data-flow-analysis/#data-flow-analysis) for more info). This ensures that the effects of all predecessors will be applied before a basic block is visited if the CFG has no back-edges, and should result in less total iterations even when back-edges exist. This should not change the results of dataflow analysis.

The current ordering for basic blocks may be pretty close to RPO already--`BasicBlock(0)` is already the start block--in which case the cost of doing the traversal up front will outweigh the efficiency gains.
A perf run is needed to check this.

r? @pnkfelix (I think).
Diffstat (limited to 'src/test/rustdoc-ui/coverage/basic.rs')
0 files changed, 0 insertions, 0 deletions