[][src]Struct llhd::ir::InstLayout

pub struct InstLayout { /* fields omitted */ }

Determines the order of instructions.

Methods

impl InstLayout[src]

pub fn new() -> Self[src]

Create a new instruction layout.

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

Check whether an instruction has been placed in the layout.

pub fn append_inst(&mut self, inst: Inst)[src]

Append an instruction to the end of the function.

pub fn prepend_inst(&mut self, inst: Inst)[src]

Prepend an instruction to the beginning of the function.

pub fn insert_inst_after(&mut self, inst: Inst, after: Inst)[src]

Insert an instruction after another instruction.

pub fn insert_inst_before(&mut self, inst: Inst, before: Inst)[src]

Insert an instruction before another instruction.

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

Remove an instruction from the function.

pub fn insts<'a>(&'a self) -> impl Iterator<Item = Inst> + 'a[src]

Return an iterator over all instructions in layout order.

pub fn first_inst(&self) -> Option<Inst>[src]

Get the first instruction in the layout.

pub fn last_inst(&self) -> Option<Inst>[src]

Get the last instruction in the layout.

pub fn prev_inst(&self, inst: Inst) -> Option<Inst>[src]

Get the instruction preceding inst in the layout.

pub fn next_inst(&self, inst: Inst) -> Option<Inst>[src]

Get the instruction following inst in the layout.

Trait Implementations

impl Default for InstLayout[src]

impl Serialize for InstLayout[src]

impl<'de> Deserialize<'de> for InstLayout[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T> From<T> for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.

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

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

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

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]