[−][src]Struct llhd::ir::InstLayout
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]
fn default() -> InstLayout
[src]
Auto Trait Implementations
impl Send for InstLayout
impl Sync for InstLayout
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,