Struct llhd::seq_body::SeqBody
[−]
[src]
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]
fn new() -> SeqBody
[src]
Create a new sequential body.
fn add_block(&mut self, block: Block, pos: BlockPosition) -> BlockRef
[src]
Add a block to the body.
fn move_block(&mut self, block: BlockRef, pos: BlockPosition)
[src]
Move a block around within the body.
fn remove_block(&mut self, block: BlockRef)
[src]
Remove a block from the body.
fn add_inst(&mut self, inst: Inst, pos: InstPosition) -> InstRef
[src]
Add an instruction to the body.
fn move_inst(&mut self, inst: InstRef, pos: InstPosition)
[src]
Move an instruction around within the body.
fn remove_inst(&mut self, inst: InstRef)
[src]
Remove an instruction from the body.
fn blocks(&self) -> IndirectMapIter<Iter<BlockRef>, Block>
[src]
Obtain an iterator over the blocks in this body.
fn block(&self, block: BlockRef) -> &Block
[src]
Get a reference to a block in the body. Panics if the block does not exist.
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.
fn inst(&self, inst: InstRef) -> &Inst
[src]
Get a reference to an instruction in the body. Panics if the instruction does not exist.
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.