pub struct MopGraph<'tcx> {
pub def_id: DefId,
pub tcx: TyCtxt<'tcx>,
pub arg_size: usize,
pub span: Span,
pub values: Vec<Value>,
pub blocks: Vec<Block<'tcx>>,
pub constants: FxHashMap<usize, usize>,
pub discriminants: FxHashMap<usize, usize>,
pub visit_times: usize,
pub alias_set: Vec<usize>,
pub ret_alias: MopAAResult,
pub terminators: Vec<TerminatorKind<'tcx>>,
}Fields§
§def_id: DefId§tcx: TyCtxt<'tcx>§arg_size: usize§span: Span§values: Vec<Value>§blocks: Vec<Block<'tcx>>§constants: FxHashMap<usize, usize>§discriminants: FxHashMap<usize, usize>§visit_times: usize§alias_set: Vec<usize>§ret_alias: MopAAResult§terminators: Vec<TerminatorKind<'tcx>>Implementations§
Source§impl<'tcx> MopGraph<'tcx>
impl<'tcx> MopGraph<'tcx>
pub fn alias_bb(&mut self, bb_index: usize)
pub fn alias_bbcall( &mut self, bb_index: usize, fn_map: &mut MopAAResultMap, recursion_set: &mut HashSet<DefId>, )
pub fn projection(&mut self, is_right: bool, place: Place<'tcx>) -> usize
pub fn merge_alias(&mut self, lv: usize, rv: usize, depth: usize)
pub fn merge(&mut self, ret_alias: &MopAAFact, arg_vec: &[usize])
pub fn merge_results(&mut self, results_nodes: Vec<Value>)
pub fn get_field_seq(&self, value: &Value) -> Vec<usize>
pub fn union_find(&mut self, e: usize) -> usize
pub fn union_merge(&mut self, e1: usize, e2: usize)
pub fn union_is_same(&mut self, e1: usize, e2: usize) -> bool
pub fn get_alias_set(&mut self, e: usize) -> HashSet<usize>
pub fn union_has_alias(&mut self, e: usize) -> bool
Source§impl<'tcx> MopGraph<'tcx>
impl<'tcx> MopGraph<'tcx>
pub fn new(tcx: TyCtxt<'tcx>, def_id: DefId) -> MopGraph<'tcx>
pub fn dfs_on_spanning_tree( &self, index: usize, stack: &mut Vec<usize>, paths: &mut Vec<Vec<usize>>, )
pub fn get_paths(&self) -> Vec<Vec<usize>>
pub fn get_all_branch_sub_blocks_paths(&self) -> Vec<Vec<usize>>
pub fn get_branch_sub_blocks_for_path(&self, path: &[usize]) -> Vec<usize>
pub fn get_switch_conds(&mut self, bb_idx: usize) -> Option<usize>
Source§impl<'tcx> MopGraph<'tcx>
impl<'tcx> MopGraph<'tcx>
pub fn split_check( &mut self, bb_idx: usize, fn_map: &mut MopAAResultMap, recursion_set: &mut HashSet<DefId>, )
pub fn split_check_with_cond( &mut self, bb_idx: usize, path_discr_id: usize, path_discr_val: usize, fn_map: &mut MopAAResultMap, recursion_set: &mut HashSet<DefId>, )
pub fn check( &mut self, bb_idx: usize, fn_map: &mut MopAAResultMap, recursion_set: &mut HashSet<DefId>, )
Sourcepub fn calculate_scc_order(
&mut self,
start: usize,
cur: usize,
scc: &Vec<usize>,
path: &mut Vec<usize>,
stacked_discriminants: &mut HashMap<usize, usize>,
visited: &mut HashSet<usize>,
paths_in_scc: &mut Vec<Vec<usize>>,
)
pub fn calculate_scc_order( &mut self, start: usize, cur: usize, scc: &Vec<usize>, path: &mut Vec<usize>, stacked_discriminants: &mut HashMap<usize, usize>, visited: &mut HashSet<usize>, paths_in_scc: &mut Vec<Vec<usize>>, )
This function performs a DFS traversal across the SCC, extracting all possible orderings that respect the control-flow structure and SwitchInt branching, taking into account enum discriminants and constant branches.
Trait Implementations§
Source§impl<'tcx> Scc for MopGraph<'tcx>
impl<'tcx> Scc for MopGraph<'tcx>
fn on_scc_found(&mut self, root: usize, scc_components: &[usize])
fn get_next(&mut self, root: usize) -> FxHashSet<usize>
fn get_size(&mut self) -> usize
fn find_scc(&mut self)
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, )
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> 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