Trait DataFlowAnalysis

Source
pub trait DataFlowAnalysis: Analysis {
    // Required methods
    fn get_fn_dataflow(&self, def_id: DefId) -> Option<DataFlowGraph>;
    fn get_all_dataflow(&self) -> DataFlowGraphMap;
    fn has_flow_between(
        &self,
        def_id: DefId,
        local1: Local,
        local2: Local,
    ) -> bool;
    fn collect_equivalent_locals(
        &self,
        def_id: DefId,
        local: Local,
    ) -> HashSet<Local>;
    fn get_fn_arg2ret(&self, def_id: DefId) -> Arg2Ret;
    fn get_all_arg2ret(&self) -> Arg2RetMap;
}
Expand description

This trait provides features related to dataflow analysis.

Required Methods§

Source

fn get_fn_dataflow(&self, def_id: DefId) -> Option<DataFlowGraph>

The function returns the dataflow graph for the given function id.

Source

fn get_all_dataflow(&self) -> DataFlowGraphMap

The function returns the dataflow graph for all functions.

Source

fn has_flow_between(&self, def_id: DefId, local1: Local, local2: Local) -> bool

If there is a dataflow between local1 and local2 within the function specified by def_id, the function returns ture; otherwise, it returns false.

Source

fn collect_equivalent_locals( &self, def_id: DefId, local: Local, ) -> HashSet<Local>

The function returns a set of Locals that are equivelent to the given local.

Source

fn get_fn_arg2ret(&self, def_id: DefId) -> Arg2Ret

The function returns an IndexVec of whether the returned Local depends on the parameter Local.

Source

fn get_all_arg2ret(&self) -> Arg2RetMap

The function returns the dataflow between the arguments and return value for all functions

Implementors§