rapx::analysis::core::alias::mop::graph

Struct MopGraph

source
pub struct MopGraph<'tcx> {
Show 14 fields pub def_id: DefId, pub tcx: TyCtxt<'tcx>, pub span: Span, pub values: Vec<ValueNode>, pub blocks: Vec<BlockNode<'tcx>>, pub arg_size: usize, pub scc_indices: Vec<usize>, pub constant: FxHashMap<usize, usize>, pub ret_alias: FnRetAlias, pub visit_times: usize, pub alias_set: Vec<usize>, pub child_scc: FxHashMap<usize, (BlockNode<'tcx>, SwitchTargets, FxHashSet<usize>)>, pub disc_map: FxHashMap<usize, usize>, pub terms: Vec<TerminatorKind<'tcx>>,
}

Fields§

§def_id: DefId§tcx: TyCtxt<'tcx>§span: Span§values: Vec<ValueNode>§blocks: Vec<BlockNode<'tcx>>§arg_size: usize§scc_indices: Vec<usize>§constant: FxHashMap<usize, usize>§ret_alias: FnRetAlias§visit_times: usize§alias_set: Vec<usize>§child_scc: FxHashMap<usize, (BlockNode<'tcx>, SwitchTargets, FxHashSet<usize>)>§disc_map: FxHashMap<usize, usize>§terms: Vec<TerminatorKind<'tcx>>

Implementations§

source§

impl<'tcx> MopGraph<'tcx>

source

pub fn alias_bb(&mut self, bb_index: usize)

source

pub fn alias_bbcall( &mut self, bb_index: usize, fn_map: &mut FnMap, recursion_set: &mut HashSet<DefId>, )

source

pub fn projection(&mut self, is_right: bool, place: Place<'tcx>) -> usize

source

pub fn merge_alias(&mut self, lv: usize, rv: usize)

source

pub fn merge(&mut self, ret_alias: &RetAlias, arg_vec: &[usize])

source

pub fn merge_results(&mut self, results_nodes: Vec<ValueNode>)

source

pub fn get_field_seq(&self, value: &ValueNode) -> Vec<usize>

source

pub fn union_find(&mut self, e: usize) -> usize

source

pub fn union_merge(&mut self, e1: usize, e2: usize)

source

pub fn union_is_same(&mut self, e1: usize, e2: usize) -> bool

source§

impl<'tcx> MopGraph<'tcx>

source

pub fn new(tcx: TyCtxt<'tcx>, def_id: DefId) -> MopGraph<'tcx>

source

pub fn tarjan( &mut self, index: usize, stack: &mut Vec<usize>, instack: &mut FxHashSet<usize>, dfn: &mut Vec<usize>, low: &mut Vec<usize>, time: &mut usize, )

source

pub fn solve_scc(&mut self)

source

pub fn switch_target(&mut self, block_index: usize) -> Option<usize>

source§

impl<'tcx> MopGraph<'tcx>

source

pub fn split_check( &mut self, bb_index: usize, fn_map: &mut FnMap, recursion_set: &mut HashSet<DefId>, )

source

pub fn split_check_with_cond( &mut self, bb_index: usize, path_discr_id: usize, path_discr_val: usize, fn_map: &mut FnMap, recursion_set: &mut HashSet<DefId>, )

source

pub fn check( &mut self, bb_index: usize, fn_map: &mut FnMap, recursion_set: &mut HashSet<DefId>, )

source

pub fn calculate_scc_order( &mut self, scc: &Vec<usize>, path: &mut Vec<usize>, ans: &mut Vec<Vec<usize>>, disc_map: &mut HashMap<usize, usize>, idx: usize, root: usize, visit: &mut HashSet<usize>, )

Auto Trait Implementations§

§

impl<'tcx> Freeze for MopGraph<'tcx>

§

impl<'tcx> !RefUnwindSafe for MopGraph<'tcx>

§

impl<'tcx> !Send for MopGraph<'tcx>

§

impl<'tcx> !Sync for MopGraph<'tcx>

§

impl<'tcx> Unpin for MopGraph<'tcx>

§

impl<'tcx> !UnwindSafe for MopGraph<'tcx>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.