pub struct Items { /* private fields */ }
Expand description
The architecture- and target-independent internal representation of functions, sections, etc in a file that is being size profiled.
Constructed with ItemsBuilder
.
Implementations§
Source§impl Items
impl Items
Sourcepub fn predecessors(&self, id: Id) -> Predecessors<'_> ⓘ
pub fn predecessors(&self, id: Id) -> Predecessors<'_> ⓘ
Iterate over an item’s predecessors.
Sourcepub fn meta_root(&self) -> Id
pub fn meta_root(&self) -> Id
Get the id of the “meta root” which is a single root item with edges to all of the real roots.
Sourcepub fn compute_predecessors(&mut self)
pub fn compute_predecessors(&mut self)
Force computation of predecessors.
Sourcepub fn compute_dominators(&mut self)
pub fn compute_dominators(&mut self)
Compute dominators for each item.
Sourcepub fn immediate_dominators(&self) -> &BTreeMap<Id, Id>
pub fn immediate_dominators(&self) -> &BTreeMap<Id, Id>
Get a refercence to immediate dominators
Sourcepub fn compute_dominator_tree(&mut self)
pub fn compute_dominator_tree(&mut self)
Force computation of the dominator tree.
Sourcepub fn dominator_tree(&self) -> &BTreeMap<Id, Vec<Id>>
pub fn dominator_tree(&self) -> &BTreeMap<Id, Vec<Id>>
Get a reference to the dominator tree.
Must have already called compute_dominator_tree
.
Sourcepub fn compute_retained_sizes(&mut self)
pub fn compute_retained_sizes(&mut self)
Force computation of the retained sizes of each IR item.
Sourcepub fn retained_size(&self, id: Id) -> u32
pub fn retained_size(&self, id: Id) -> u32
Get the given item’s retained size.
Sourcepub fn get_item_by_name(&self, name: &str) -> Option<&Item>
pub fn get_item_by_name(&self, name: &str) -> Option<&Item>
Get an item with the given name.
Trait Implementations§
Source§impl<'a> IntoNeighbors for &'a Items
impl<'a> IntoNeighbors for &'a Items
Auto Trait Implementations§
impl Freeze for Items
impl RefUnwindSafe for Items
impl Send for Items
impl Sync for Items
impl Unpin for Items
impl UnwindSafe for Items
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