MfpAliasAnalyzer

Struct MfpAliasAnalyzer 

Source
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>

Source

pub fn new(tcx: TyCtxt<'tcx>) -> Self

Create a new MFP alias analyzer

Source

fn get_arg_count(&self, def_id: DefId) -> Option<usize>

Get argument count for a function (returns None if MIR not available)

Source

fn analyze_function( &mut self, def_id: DefId, fn_summaries: &Rc<RefCell<FxHashMap<DefId, FnAliasPairs>>>, )

Analyze a single function

Source

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>

Source§

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

Return the aliases among the function arguments and return value for all functions.
Source§

fn get_local_fn_alias(&self) -> FnAliasMap

Return the aliases among the function arguments and return value for functions of the local crate.
Source§

impl<'tcx> Analysis for MfpAliasAnalyzer<'tcx>

Source§

fn name(&self) -> &'static str

Return the name of the analysis.
Source§

fn run(&mut self)

Execute the analysis.
Source§

fn reset(&mut self)

Reset the analysis and cleanup the memory.

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> 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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V