Struct llhd::ir::prelude::Unit [−][src]
pub struct Unit<'a> { /* fields omitted */ }
Expand description
An immutable function, process, or entity.
Implementations
Create a new unit wrapper around raw unit data.
Create a new unit wrapper around raw unit data that has not been added to a module yet.
👎 Deprecated since 0.13.0: simply drop the dump()
simply drop the dump()
Dump the unit in human-readable form.
Check if this unit is a Function
.
Check if this unit is a Process
.
Return an iterator over the unit’s input arguments.
Return an iterator over the unit’s output arguments.
Return an iterator over the unit’s arguments.
Get the output argument at position pos
.
Return the name of an external unit.
Return the signature of an external unit.
Return an iterator over the external units used by this unit.
Compute the unit’s temporal region graph.
Compute the unit’s block predecessor table.
Compute the unit’s temporal block predecessor table.
Compute the unit’s dominator tree.
Compute the unit’s temporal dominator tree.
Compute the unit’s dominator tree, if a predecessor table is already available.
Return the name of a BB.
Return the anonymous name hint of a BB.
Check if a value is a placeholder.
Returns whether an instruction produces a result.
Returns the result of an instruction.
Returns the result of an instruction.
Returns the type of a value.
Return the argument that produces value
.
Return the instruction that produces value
.
Return the instruction that produces value
, or panic.
Return the anonymous name hint of a value.
Check if a value has exactly one use.
Resolve a constant value.
Returns None
if the value is not constant. Note that this does not
perform constant folding. Rather, the value must resolve to an
instruction which produces a constant value.
Resolve a constant time value.
Returns None
if the value is not constant. Note that this does not
perform constant folding. Rather, the value must resolve to an
instruction which produces a constant value.
Resolve a constant integer value.
Returns None
if the value is not constant. Note that this does not
perform constant folding. Rather, the value must resolve to an
instruction which produces a constant value.
Resolve a constant array value.
Returns None
if the value is not constant. Note that this does not
perform constant folding. Rather, the value must resolve to an
instruction which produces a constant value.
Resolve a constant struct value.
Returns None
if the value is not constant. Note that this does not
perform constant folding. Rather, the value must resolve to an
instruction which produces a constant value.
Get the location hint associated with an instruction.
Returns the byte offset of the instruction in the input file, or None if there is no hint for the instruction.
Get the block ID bound.
This function is useful for creating dense vectors to associate data with blocks.
Basic Block Layout
The following functions are used to query the basic block layout.
Return an iterator over all BBs in layout order.
Check if a block is inserted into the layout.
Get the first BB in the layout. This is the entry block.
Get the last BB in the layout.
Get the BB preceding bb
in the layout.
Get the BB following bb
in the layout.
Instruction Layout
The following functions are used to query the instruction layout within a block.
Get the BB which contains inst
, or None
if inst
is not inserted.
Return an iterator over all instructions in a block in layout order.
Return an iterator over all instructions in layout order.
Check if an instruction is inserted into the layout.
Get the first instruction in the layout.
Get the instruction preceding inst
in the layout.
Get the instruction following inst
in the layout.
Get the terminator instruction in the layout.
The fallible alternative is last_inst(bb)
.
Trait Implementations
type Output = ExtUnitData
type Output = ExtUnitData
The returned type after indexing.
Performs the indexing (container[index]
) operation. Read more
Auto Trait Implementations
impl<'a> RefUnwindSafe for Unit<'a>
impl<'a> UnwindSafe for Unit<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more