Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #68241 - ecstatic-morse:unified-dataflow-impls, r=pnkfelix
Migrate borrowck dataflow impls to new framework This uses #65672 to implement the dataflow analyses needed by borrowck. These include all the `InitializedPlaces` analyses as well as `Borrows`. Additionally, this PR contains several independent changes around the dataflow API which improve performance and make it more ergonomic. * An optimization that inhibits the caching of block transfer functions for acyclic MIR (~0.3% I-CNT savings). * A `ResultsVisitor` for dataflow results that is more efficient than `ResultsCursor` when we have to visit every statement unconditionally (~0.3% I-CNT savings). * An `into_engine` method on `Analysis` that selects the appropriate `Engine` constructor. * A `contains` method for `ResultsCursor` as a shorthand for `.get().contains()`. * A `find_descendants` helper on `MovePath` that replaces `has_any_child_of` on the old `FlowsAtLocation` These changes made porting the dataflow analyses much easier. Finally, this PR removes some now-unused code in `dataflow/at_location.rs` and elsewhere. You can view the perf results for the final version of this PR [here](https://perf.rust-lang.org/compare.html?start=29b854fb741809c29764e33fc17c32ba9c6523ba&end=6e516c1410c18cfe4eb6d030a39fdb73c8d8a4fe). Here's an example of the graphviz diagrams that are generated for the `MaybeInitializedPlaces` analysis. ![image](https://user-images.githubusercontent.com/29463364/72846117-c3e97d80-3c54-11ea-8171-3d48981c9ddd.png)
- Loading branch information