Struct debris_llir::opt::call_graph::CallGraph
source · pub struct CallGraph {
graph: GraphMatrix<NonZeroU32>,
loop_detector: GraphLoopDetector,
visitor: GraphDfs,
}
Fields§
§graph: GraphMatrix<NonZeroU32>
§loop_detector: GraphLoopDetector
§visitor: GraphDfs
Implementations§
source§impl CallGraph
impl CallGraph
pub fn update(&mut self, functions: &FxHashMap<BlockId, Function>)
pub fn get_called_functions( &self, function: BlockId ) -> impl Iterator<Item = BlockId> + '_
pub fn modify_call( &mut self, caller: BlockId, called_block: BlockId, delta: i32 )
pub fn has_loop(&mut self, start: BlockId) -> bool
pub fn iter_dfs<'a>( &'a mut self, root: impl Iterator<Item = BlockId> + 'a ) -> impl Iterator<Item = BlockId> + 'a
sourcepub fn get_reachable_from(
&self,
root: impl Iterator<Item = BlockId>
) -> FxHashSet<BlockId>
pub fn get_reachable_from( &self, root: impl Iterator<Item = BlockId> ) -> FxHashSet<BlockId>
Returns a set of all functions that can be reached from root
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for CallGraph
impl Send for CallGraph
impl Sync for CallGraph
impl Unpin for CallGraph
impl UnwindSafe for CallGraph
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