[−][src]Trait llhd::ir::prelude::Unit
A Function
, Process
, or Entity
.
Required methods
fn dfg(&self) -> &DataFlowGraph
Get the unit's DFG.
fn dfg_mut(&mut self) -> &mut DataFlowGraph
Get the unit's mutable DFG.
fn cfg(&self) -> &ControlFlowGraph
Get the unit's CFG.
fn cfg_mut(&mut self) -> &mut ControlFlowGraph
Get the unit's mutable CFG.
fn sig(&self) -> &Signature
Get the unit's signature.
fn sig_mut(&mut self) -> &mut Signature
Get the unit's mutable signature.
fn name(&self) -> &UnitName
Get the unit's name.
fn name_mut(&mut self) -> &mut UnitName
Get the unit's mutable name.
fn dump_fmt(&self, f: &mut Formatter) -> Result
Actual implementation of dump()
.
fn verify(&self)
Panic if the unit is not well-formed.
fn kind(&self) -> UnitKind
Return the kind of this unit.
Provided methods
fn dump(&self) -> UnitDumper<&Self>
Dump the unit in human-readable form.
fn is_function(&self) -> bool
Check if this unit is a Function
.
fn is_process(&self) -> bool
Check if this unit is a Process
.
fn is_entity(&self) -> bool
Check if this unit is an Entity
.
fn arg_value(&self, arg: Arg) -> Value
Get the value of argument arg
.
fn input_args<'a>(&'a self) -> Box<dyn Iterator<Item = Value> + 'a>
Return an iterator over the unit's input arguments.
fn output_args<'a>(&'a self) -> Box<dyn Iterator<Item = Value> + 'a>
Return an iterator over the unit's output arguments.
fn args<'a>(&'a self) -> Box<dyn Iterator<Item = Value> + 'a>
Return an iterator over the unit's arguments.
fn input_arg(&self, pos: usize) -> Value
Get the input argument at position pos
.
fn output_arg(&self, pos: usize) -> Value
Get the output argument at position pos
.
fn has_result(&self, inst: Inst) -> bool
Returns whether an instruction produces a result.
fn inst_result(&self, inst: Inst) -> Value
Returns the result of an instruction.
fn value_type(&self, value: Value) -> Type
Returns the type of a value.
fn extern_name(&self, ext: ExtUnit) -> &UnitName
Return the name of an external unit.
fn extern_sig(&self, ext: ExtUnit) -> &Signature
Return the signature of an external unit.