Skip to content

Commit a7f5252

Browse files
Add summary of the current state and future plans
1 parent 08aff1a commit a7f5252

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/librustc_mir/dataflow/generic.rs

+18
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
//! Dataflow analysis with arbitrary transfer functions.
2+
//!
3+
//! This module is a work in progress. You should instead use `BitDenotation` in
4+
//! `librustc_mir/dataflow/mod.rs` and encode your transfer function as a [gen/kill set][gk]. In
5+
//! doing so, your analysis will run faster and you will be able to generate graphviz diagrams for
6+
//! debugging with no extra effort. The interface in this module is intended only for dataflow
7+
//! problems that cannot be expressed using gen/kill sets.
8+
//!
9+
//! FIXME(ecstaticmorse): In the long term, the plan is to preserve the existing `BitDenotation`
10+
//! interface, but make `Engine` and `ResultsCursor` the canonical way to perform and inspect a
11+
//! dataflow analysis. This requires porting the graphviz debugging logic to this module, deciding
12+
//! on a way to handle the `before` methods in `BitDenotation` and creating an adapter so that
13+
//! gen-kill problems can still be evaluated efficiently. See the discussion in [#64566][] for more
14+
//! information.
15+
//!
16+
//! [gk]: https://en.wikipedia.org/wiki/Data-flow_analysis#Bit_vector_problems
17+
//! [#64566]: https://github.com/rust-lang/rust/pull/64566
18+
119
use std::cmp::Ordering;
220
use std::ops;
321

0 commit comments

Comments
 (0)