[][src]Struct llhd::ir::Function

pub struct Function {
    pub name: UnitName,
    pub sig: Signature,
    pub dfg: DataFlowGraph,
    pub cfg: ControlFlowGraph,
    pub layout: FunctionLayout,
}

A function.

Fields

name: UnitNamesig: Signaturedfg: DataFlowGraphcfg: ControlFlowGraphlayout: FunctionLayout

Methods

impl Function[src]

pub fn new(name: UnitName, sig: Signature) -> Self[src]

Create a new function.

Trait Implementations

impl Unit for Function[src]

fn dump(&self) -> UnitDumper<&Self>[src]

Dump the unit in human-readable form.

fn is_function(&self) -> bool[src]

Check if this unit is a Function.

fn is_process(&self) -> bool[src]

Check if this unit is a Process.

fn is_entity(&self) -> bool[src]

Check if this unit is an Entity.

fn arg_value(&self, arg: Arg) -> Value[src]

Get the value of argument arg.

fn input_args<'a>(&'a self) -> Box<dyn Iterator<Item = Value> + 'a>[src]

Return an iterator over the unit's input arguments.

fn output_args<'a>(&'a self) -> Box<dyn Iterator<Item = Value> + 'a>[src]

Return an iterator over the unit's output arguments.

fn args<'a>(&'a self) -> Box<dyn Iterator<Item = Value> + 'a>[src]

Return an iterator over the unit's arguments.

fn input_arg(&self, pos: usize) -> Value[src]

Get the input argument at position pos.

fn output_arg(&self, pos: usize) -> Value[src]

Get the output argument at position pos.

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

Returns whether an instruction produces a result.

fn inst_result(&self, inst: Inst) -> Value[src]

Returns the result of an instruction.

fn value_type(&self, value: Value) -> Type[src]

Returns the type of a value.

fn extern_name(&self, ext: ExtUnit) -> &UnitName[src]

Return the name of an external unit.

fn extern_sig(&self, ext: ExtUnit) -> &Signature[src]

Return the signature of an external unit.

Auto Trait Implementations

impl Send for Function

impl Sync for Function

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
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto 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 for T where
    T: ?Sized
[src]

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

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