[][src]Struct llhd::SeqBody

pub struct SeqBody { /* fields omitted */ }

A sequential body of blocks and instructions. Represents a control flow graph as describe by a process or function, i.e. a sequential arrangement of instructions. This in contrast to the dataflow body of an entity.

Methods

impl SeqBody
[src]

pub fn new() -> SeqBody
[src]

Create a new sequential body.

pub fn add_block(&mut self, block: Block, pos: BlockPosition) -> BlockRef
[src]

Add a block to the body.

pub fn move_block(&mut self, block: BlockRef, pos: BlockPosition)
[src]

Move a block around within the body.

pub fn remove_block(&mut self, block: BlockRef)
[src]

Remove a block from the body.

pub fn add_inst(&mut self, inst: Inst, pos: InstPosition) -> InstRef
[src]

Add an instruction to the body.

pub fn move_inst(&mut self, inst: InstRef, pos: InstPosition)
[src]

Move an instruction around within the body.

pub fn remove_inst(&mut self, inst: InstRef)
[src]

Remove an instruction from the body.

Important traits for IndirectMapIter<'tf, T, V>
pub fn blocks(&self) -> IndirectMapIter<Iter<BlockRef>, Block>
[src]

Obtain an iterator over the blocks in this body.

pub fn block(&self, block: BlockRef) -> &Block
[src]

Get a reference to a block in the body. Panics if the block does not exist.

pub fn block_mut(&mut self, block: BlockRef) -> &mut Block
[src]

Get a mutable reference to a block in the body. Panics if the block does not exist.

pub fn inst(&self, inst: InstRef) -> &Inst
[src]

Get a reference to an instruction in the body. Panics if the instruction does not exist.

pub fn inst_mut(&mut self, inst: InstRef) -> &mut Inst
[src]

Get a mutable reference to an instruction in the body. Panics if the instruction does not exist.

Auto Trait Implementations

impl Send for SeqBody

impl Sync for SeqBody

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]