diff options
| author | Dylan MacKenzie <ecstaticmorse@gmail.com> | 2019-09-18 08:41:38 -0700 |
|---|---|---|
| committer | Dylan MacKenzie <ecstaticmorse@gmail.com> | 2019-09-18 08:41:38 -0700 |
| commit | a7f52520d5433a2bd3e4e6727b311047ef066500 (patch) | |
| tree | dc6550c53dc744573b5fb34f715d6b8f775fd510 | |
| parent | 08aff1afe5edb5c31ebb2b1bcdf6025fa323a8fe (diff) | |
| download | rust-a7f52520d5433a2bd3e4e6727b311047ef066500.tar.gz rust-a7f52520d5433a2bd3e4e6727b311047ef066500.zip | |
Add summary of the current state and future plans
| -rw-r--r-- | src/librustc_mir/dataflow/generic.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/librustc_mir/dataflow/generic.rs b/src/librustc_mir/dataflow/generic.rs index a4b81968d72..5a28df42f20 100644 --- a/src/librustc_mir/dataflow/generic.rs +++ b/src/librustc_mir/dataflow/generic.rs @@ -1,3 +1,21 @@ +//! Dataflow analysis with arbitrary transfer functions. +//! +//! This module is a work in progress. You should instead use `BitDenotation` in +//! `librustc_mir/dataflow/mod.rs` and encode your transfer function as a [gen/kill set][gk]. In +//! doing so, your analysis will run faster and you will be able to generate graphviz diagrams for +//! debugging with no extra effort. The interface in this module is intended only for dataflow +//! problems that cannot be expressed using gen/kill sets. +//! +//! FIXME(ecstaticmorse): In the long term, the plan is to preserve the existing `BitDenotation` +//! interface, but make `Engine` and `ResultsCursor` the canonical way to perform and inspect a +//! dataflow analysis. This requires porting the graphviz debugging logic to this module, deciding +//! on a way to handle the `before` methods in `BitDenotation` and creating an adapter so that +//! gen-kill problems can still be evaluated efficiently. See the discussion in [#64566][] for more +//! information. +//! +//! [gk]: https://en.wikipedia.org/wiki/Data-flow_analysis#Bit_vector_problems +//! [#64566]: https://github.com/rust-lang/rust/pull/64566 + use std::cmp::Ordering; use std::ops; |
