[][src]Struct gf::pivot::stmt::Stmt

pub struct Stmt<'a, T = UnsealedStmt> { /* fields omitted */ }

🟢 Statement in a sealed module.

Implementations

impl<'a, T> Stmt<'a, T>[src]

pub fn module(&self) -> &'a Module[src]

Return parent module.

pub fn basic_block(&self) -> BasicBlock<'a>[src]

Return parent basic block.

pub fn index(&self) -> usize[src]

Return statement index in parent basic block.

pub fn as_unsealed(&self) -> &'a T[src]

Return the unsealed statement.

pub fn into_type_erased(self) -> Stmt<'a, UnsealedStmt>[src]

Erase specific statement kind.

pub fn map<U, F: FnOnce(&'a T) -> &'a U>(self, f: F) -> Stmt<'a, U>[src]

Map Stmt<T> to Stmt<U> using f.

pub fn next(&self) -> Option<Stmt<'a, UnsealedStmt>>[src]

Return the next statement, if any.

pub fn prev(&self) -> Option<Stmt<'a, UnsealedStmt>>[src]

Return the previous statement, if any.

impl<'a> Stmt<'a, UnsealedStmt>[src]

pub fn at_start_of(basic_block: BasicBlock<'a>) -> Option<Self>[src]

Return statement at the start of a basic block, None if empty.

pub fn at_end_of(basic_block: BasicBlock<'a>) -> Option<Self>[src]

Return statement at the end of a basic block, None if empty.

pub fn at_index(basic_block: BasicBlock<'a>, index: usize) -> Option<Self>[src]

Return statement at given index in a basic_block.

pub fn kind(&self) -> StmtKind[src]

Return statement kind.

pub fn into_apply(self) -> Option<Stmt<'a, Apply>>[src]

Map into an APPLY statement.

pub fn into_call(self) -> Option<Stmt<'a, Call>>[src]

Map into a CALL statement.

pub fn into_init(self) -> Option<Stmt<'a, Init>>[src]

Map into an INIT statement.

pub fn into_load(self) -> Option<Stmt<'a, Load>>[src]

Map into a LOAD statement.

pub fn into_mix(self) -> Option<Stmt<'a, Mix>>[src]

Map into a MIX statement.

pub fn into_slice(self) -> Option<Stmt<'a, Slice>>[src]

Map into a SLICE statement.

pub fn into_store(self) -> Option<Stmt<'a, Store>>[src]

Map into a STORE statement.

impl<'a> Stmt<'a, Apply>[src]

pub fn op(&self) -> BitVecOp[src]

Return bit vector operator.

pub fn inputs(&self) -> &'a [Var][src]

Return input variables.

pub fn output(&self) -> Var[src]

Return output variable.

impl<'a> Stmt<'a, Call>[src]

pub fn fragment(&self) -> Fragment<'a>[src]

Return target fragment.

pub fn inputs(&self) -> &'a [Var][src]

Return input variables.

pub fn outputs(&self) -> &'a [Var][src]

Return output variables.

impl<'a> Stmt<'a, Init>[src]

pub fn constant(&self) -> Constant<'a>[src]

Return constant.

pub fn constant_value(&self) -> &'a BitVec[src]

Return constant value.

pub fn output(&self) -> Var[src]

Return output variable.

impl<'a> Stmt<'a, Load>[src]

pub fn space(&self) -> Space<'a>[src]

Return space.

pub fn endianness(&self) -> Endianness[src]

Return access endianness.

pub fn address(&self) -> Var[src]

Return address variable.

pub fn output(&self) -> Var[src]

Return output variable.

pub fn output_size(&self) -> VarSize[src]

Return output variable size.

pub fn space_elt<A>(&self, address: A) -> SpaceElt<'a, A>[src]

Return space element for this load with the provided address value.

pub fn space_elt_with<A, F: FnOnce(Var) -> A>(&self, f: F) -> SpaceElt<'a, A>[src]

Return space element for this load with the provided address value function.

impl<'a> Stmt<'a, Mix>[src]

pub fn inputs(&self) -> &'a [Var][src]

Return input variables.

pub fn outputs(&self) -> &'a [Var][src]

Return output variables.

impl<'a> Stmt<'a, Slice>[src]

pub fn inputs(&self) -> &'a [Var][src]

Return input variables.

pub fn output(&self) -> Var[src]

Return output variable.

pub fn output_size(&self) -> VarSize[src]

Return output variable size.

pub fn offset(&self) -> VarSize[src]

Return slice bit offset.

impl<'a> Stmt<'a, Store>[src]

pub fn space(&self) -> Space<'a>[src]

Return space.

pub fn endianness(&self) -> Endianness[src]

Return access endianness.

pub fn address(&self) -> Var[src]

Return address variable.

pub fn value(&self) -> Var[src]

Return value variable.

pub fn space_elt<A>(&self, address: A) -> SpaceElt<'a, A>[src]

Return space element for this store with the provided address value.

pub fn space_elt_with<A, F: FnOnce(Var) -> A>(&self, f: F) -> SpaceElt<'a, A>[src]

Return space element for this store with the provided address value function.

Trait Implementations

impl<'a, T> Clone for Stmt<'a, T>[src]

impl<'a, T> Copy for Stmt<'a, T>[src]

impl<'a, T> Eq for Stmt<'a, T>[src]

impl<'a, T> Hash for Stmt<'a, T>[src]

impl<'a, T> PartialEq<Stmt<'a, T>> for Stmt<'a, T>[src]

Auto Trait Implementations

impl<'a, T> RefUnwindSafe for Stmt<'a, T> where
    T: RefUnwindSafe

impl<'a, T> Send for Stmt<'a, T> where
    T: Sync

impl<'a, T> Sync for Stmt<'a, T> where
    T: Sync

impl<'a, T> Unpin for Stmt<'a, T>

impl<'a, T> UnwindSafe for Stmt<'a, T> where
    T: RefUnwindSafe

Blanket Implementations

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

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

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

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

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

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.