pub struct CallGraphInfo { /* private fields */ }Expand description
Module-level internal-call graph facts.
Implementations§
Source§impl CallGraphInfo
impl CallGraphInfo
Sourcepub fn new(module: &Module) -> CallGraphInfo
pub fn new(module: &Module) -> CallGraphInfo
Computes call graph facts for module.
Sourcepub fn callees(
&self,
func: FunctionId,
) -> Option<&HashSet<FunctionId, FxBuildHasher>>
pub fn callees( &self, func: FunctionId, ) -> Option<&HashSet<FunctionId, FxBuildHasher>>
Returns functions directly called by func.
Sourcepub fn callers(
&self,
func: FunctionId,
) -> Option<&HashSet<FunctionId, FxBuildHasher>>
pub fn callers( &self, func: FunctionId, ) -> Option<&HashSet<FunctionId, FxBuildHasher>>
Returns functions that directly call func.
Sourcepub fn entry_functions(&self) -> &HashSet<FunctionId, FxBuildHasher>
pub fn entry_functions(&self) -> &HashSet<FunctionId, FxBuildHasher>
Returns entry functions: external ABI entries, constructor, fallback, and receive.
Sourcepub fn reachable_from_entries(&self) -> &HashSet<FunctionId, FxBuildHasher>
pub fn reachable_from_entries(&self) -> &HashSet<FunctionId, FxBuildHasher>
Returns all functions reachable from entry functions.
Sourcepub fn is_recursive(&self, func: FunctionId) -> bool
pub fn is_recursive(&self, func: FunctionId) -> bool
Returns true if func is directly or indirectly recursive.
Sourcepub fn reachable_bodies_from(
&self,
roots: impl IntoIterator<Item = FunctionId>,
) -> HashSet<FunctionId, FxBuildHasher>
pub fn reachable_bodies_from( &self, roots: impl IntoIterator<Item = FunctionId>, ) -> HashSet<FunctionId, FxBuildHasher>
Returns functions reachable from roots that have MIR bodies.
Sourcepub fn reachable_from_roots(
&self,
roots: impl IntoIterator<Item = FunctionId>,
) -> HashSet<FunctionId, FxBuildHasher>
pub fn reachable_from_roots( &self, roots: impl IntoIterator<Item = FunctionId>, ) -> HashSet<FunctionId, FxBuildHasher>
Returns all functions reachable from roots.
Trait Implementations§
Source§impl Clone for CallGraphInfo
impl Clone for CallGraphInfo
Source§fn clone(&self) -> CallGraphInfo
fn clone(&self) -> CallGraphInfo
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CallGraphInfo
impl RefUnwindSafe for CallGraphInfo
impl Send for CallGraphInfo
impl Sync for CallGraphInfo
impl Unpin for CallGraphInfo
impl UnsafeUnpin for CallGraphInfo
impl UnwindSafe for CallGraphInfo
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, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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