about summary refs log tree commit diff
path: root/src/test/ui/thinlto
diff options
context:
space:
mode:
authorDylan MacKenzie <ecstaticmorse@gmail.com>2019-06-22 13:00:17 -0700
committerDylan MacKenzie <ecstaticmorse@gmail.com>2019-06-27 11:38:52 -0700
commit07c5e2b310bf20fdccedc6a927f1417cb9ddc7fa (patch)
treeadc11640e181a0bc90162d9f356b5b8a66592cf6 /src/test/ui/thinlto
parenta5b17298f2d1c5994c73e540ce7c44830af0d4dc (diff)
downloadrust-07c5e2b310bf20fdccedc6a927f1417cb9ddc7fa.tar.gz
rust-07c5e2b310bf20fdccedc6a927f1417cb9ddc7fa.zip
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. 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 is pretty close to RPO
already--`BasicBlock(0)` is already the start block, so the gains from
this are pretty small, especially since we need to do an extra traversal
up front.

Note that some basic blocks are unreachable from the `START_BLOCK`
during dataflow. We add these blocks to the work queue as well to
preserve the original behavior.
Diffstat (limited to 'src/test/ui/thinlto')
0 files changed, 0 insertions, 0 deletions