[−][src]Struct gf::pivot::fragment::UnsealedFragmentCfg
⚪ Control flow graph of an unsealed fragment.
Implementations
impl<D: Direction> UnsealedFragmentCfg<D>
[src]
pub fn new(module: &UnsealedModule, fragment: &UnsealedFragment) -> Self
[src]
Build the CFG of an unsealed fragment.
Errors
- Panics if a basic block reachable from the entry does not exist.
pub fn entry(&self) -> BasicBlockId
[src]
Return the entry basic block wrt to CFG direction.
pub fn exit(&self) -> BasicBlockId
[src]
Return the exit basic block wrt to CFG direction.
pub fn contains(&self, basic_block: BasicBlockId) -> bool
[src]
Return whether this CFG contains a basic block.
pub fn pred(&self, basic_block: BasicBlockId) -> &[UnsealedEdge]
[src]
Return predecessor edges of a basic block wrt to CFG direction.
Errors
- Panics if the basic block does not belong to this CFG.
pub fn succ(&self, basic_block: BasicBlockId) -> &[UnsealedEdge]
[src]
Return successor edges of a basic block wrt to CFG direction.
Errors
- Panics if the basic block does not belong to this CFG.
pub fn preorder(&self) -> impl Iterator<Item = BasicBlockId> + '_
[src]
Return a preorder iterator over basic blocks.
pub fn preorder_index(&self, basic_block: BasicBlockId) -> usize
[src]
Return preorder index of a basic block.
Errors
- Panics if the basic block does not belong to this CFG.
pub fn preorder_index_map(&self) -> &HashMap<BasicBlockId, usize>
[src]
Return the entire preorder index map.
pub fn reverse_preorder(&self) -> impl Iterator<Item = BasicBlockId> + '_
[src]
Return a reverse preorder iterator over basic blocks.
pub fn postorder(&self) -> impl Iterator<Item = BasicBlockId> + '_
[src]
Return a postorder iterator over basic blocks.
pub fn postorder_index(&self, basic_block: BasicBlockId) -> usize
[src]
Return postorder index of a basic block.
Errors
- Panics if the basic block does not belong to this CFG.
pub fn postorder_index_map(&self) -> &HashMap<BasicBlockId, usize>
[src]
Return the entire postorder index map.
pub fn reverse_postorder(&self) -> impl Iterator<Item = BasicBlockId> + '_
[src]
Return a reverse postorder iterator over basic blocks.
Trait Implementations
impl<D: Clone + Direction> Clone for UnsealedFragmentCfg<D>
[src]
fn clone(&self) -> UnsealedFragmentCfg<D>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<D: Debug + Direction> Debug for UnsealedFragmentCfg<D>
[src]
Auto Trait Implementations
impl<D> RefUnwindSafe for UnsealedFragmentCfg<D> where
D: RefUnwindSafe,
D: RefUnwindSafe,
impl<D> Send for UnsealedFragmentCfg<D> where
D: Send,
D: Send,
impl<D> Sync for UnsealedFragmentCfg<D> where
D: Sync,
D: Sync,
impl<D> Unpin for UnsealedFragmentCfg<D> where
D: Unpin,
D: Unpin,
impl<D> UnwindSafe for UnsealedFragmentCfg<D> where
D: UnwindSafe,
D: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,