pub struct DataflowGraph {
pub def_id: DefId,
pub span: Span,
pub argc: usize,
pub nodes: GraphNodes,
pub edges: GraphEdges,
pub n_locals: usize,
pub closures: HashSet<DefId>,
pub block: usize,
pub statement_index: usize,
}Fields§
§def_id: DefId§span: Span§argc: usize§nodes: GraphNodes§edges: GraphEdges§n_locals: usize§closures: HashSet<DefId>§block: usize§statement_index: usizeImplementations§
Source§impl DataflowGraph
impl DataflowGraph
pub fn to_dot_graph<'tcx>(&self, tcx: &TyCtxt<'tcx>) -> String
Source§impl DataflowGraph
impl DataflowGraph
pub fn add_operand(&mut self, operand: &Operand<'_>, dst: Local)
pub fn parse_place(&mut self, place: &Place<'_>) -> Local
pub fn add_statm_to_graph(&mut self, statement: &Statement<'_>)
pub fn add_terminator_to_graph(&mut self, terminator: &Terminator<'_>)
pub fn query_node_by_span( &self, span: Span, strict: bool, ) -> Option<(Local, &DataflowNode)>
Source§impl DataflowGraph
impl DataflowGraph
pub fn new(def_id: DefId, span: Span, argc: usize, n_locals: usize) -> Self
pub fn node(&self, local: Local) -> &DataflowNode
pub fn node_mut(&mut self, local: Local) -> &mut DataflowNode
pub fn edge(&self, idx: EdgeIdx) -> &DataflowEdge
pub fn is_marker(&self, idx: Local) -> bool
pub fn add_node_edge(&mut self, src: Local, dst: Local, op: EdgeOp) -> EdgeIdx
pub fn add_const_edge( &mut self, src_desc: String, src_ty: String, dst: Local, op: EdgeOp, ) -> EdgeIdx
pub fn get_upside_idx(&self, node_idx: Local, order: usize) -> Option<Local>
pub fn get_downside_idx(&self, node_idx: Local, order: usize) -> Option<Local>
pub fn is_connected(&self, idx_1: Local, idx_2: Local) -> bool
pub fn param_return_deps(&self) -> IndexVec<Local, bool>
pub fn dfs<F, G>( &self, now: Local, direction: Direction, node_operator: &mut F, edge_validator: &mut G, traverse_all: bool, seen: &mut HashSet<Local>, ) -> (DFSStatus, bool)
pub fn equivalent_edge_validator( graph: &DataflowGraph, idx: EdgeIdx, ) -> DFSStatus
pub fn always_true_edge_validator(_: &DataflowGraph, _: EdgeIdx) -> DFSStatus
pub fn collect_equivalent_locals( &self, local: Local, strict: bool, ) -> HashSet<Local>
pub fn collect_ancestor_locals( &self, local: Local, self_included: bool, ) -> HashSet<Local>
pub fn collect_descending_locals( &self, local: Local, self_included: bool, ) -> HashSet<Local>
pub fn get_field_sequence(&self, local: Local) -> Option<(Local, Vec<usize>)>
Trait Implementations§
Source§impl Clone for DataflowGraph
impl Clone for DataflowGraph
Source§fn clone(&self) -> DataflowGraph
fn clone(&self) -> DataflowGraph
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl From<DataflowGraph> for DataFlowGraph
impl From<DataflowGraph> for DataFlowGraph
Source§fn from(graph: DataflowGraph) -> Self
fn from(graph: DataflowGraph) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for DataflowGraph
impl RefUnwindSafe for DataflowGraph
impl Send for DataflowGraph
impl Sync for DataflowGraph
impl Unpin for DataflowGraph
impl UnwindSafe for DataflowGraph
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more