pub struct MfpAliasAnalyzer<'tcx> {
tcx: TyCtxt<'tcx>,
fn_map: FxHashMap<DefId, FnAliasPairs>,
}Expand description
MFP-based alias analyzer
Fields§
§tcx: TyCtxt<'tcx>§fn_map: FxHashMap<DefId, FnAliasPairs>Function summaries (alias relationships between arguments and return values)
Implementations§
Source§impl<'tcx> MfpAliasAnalyzer<'tcx>
impl<'tcx> MfpAliasAnalyzer<'tcx>
Sourcefn get_arg_count(&self, def_id: DefId) -> Option<usize>
fn get_arg_count(&self, def_id: DefId) -> Option<usize>
Get argument count for a function (returns None if MIR not available)
Sourcefn analyze_function(
&mut self,
def_id: DefId,
fn_summaries: &Rc<RefCell<FxHashMap<DefId, FnAliasPairs>>>,
)
fn analyze_function( &mut self, def_id: DefId, fn_summaries: &Rc<RefCell<FxHashMap<DefId, FnAliasPairs>>>, )
Analyze a single function
Sourcefn collect_reachable_functions(
&self,
def_id: DefId,
reachable: &mut FxHashSet<DefId>,
)
fn collect_reachable_functions( &self, def_id: DefId, reachable: &mut FxHashSet<DefId>, )
Recursively collect all reachable functions with available MIR
Trait Implementations§
Source§impl<'tcx> AliasAnalysis for MfpAliasAnalyzer<'tcx>
impl<'tcx> AliasAnalysis for MfpAliasAnalyzer<'tcx>
Source§fn get_fn_alias(&self, def_id: DefId) -> Option<FnAliasPairs>
fn get_fn_alias(&self, def_id: DefId) -> Option<FnAliasPairs>
Return the aliases among the function arguments and return value of a specific function.
Source§fn get_all_fn_alias(&self) -> FnAliasMap
fn get_all_fn_alias(&self) -> FnAliasMap
Return the aliases among the function arguments and return value for all functions.
Source§fn get_local_fn_alias(&self) -> FnAliasMap
fn get_local_fn_alias(&self) -> FnAliasMap
Return the aliases among the function arguments and return value for functions of the local
crate.
Auto Trait Implementations§
impl<'tcx> Freeze for MfpAliasAnalyzer<'tcx>
impl<'tcx> !RefUnwindSafe for MfpAliasAnalyzer<'tcx>
impl<'tcx> !Send for MfpAliasAnalyzer<'tcx>
impl<'tcx> !Sync for MfpAliasAnalyzer<'tcx>
impl<'tcx> Unpin for MfpAliasAnalyzer<'tcx>
impl<'tcx> !UnwindSafe for MfpAliasAnalyzer<'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