[−][src]Struct libfirm_rs::Graph
Methods
impl Graph
[src]
impl Graph
pub fn function_with_entity(entity: Entity, num_slots: usize) -> Self
[src]
pub fn function_with_entity(entity: Entity, num_slots: usize) -> Self
pub fn entity(self) -> Entity
[src]
pub fn entity(self) -> Entity
pub fn start_block(self) -> Block
[src]
pub fn start_block(self) -> Block
pub fn end_block(self) -> Block
[src]
pub fn end_block(self) -> Block
pub fn start(self) -> Start
[src]
pub fn start(self) -> Start
pub fn set_start_block(self, block: Block)
[src]
pub fn set_start_block(self, block: Block)
pub fn end(self) -> End
[src]
pub fn end(self) -> End
ⓘImportant traits for EndKeepAliveIteratorpub fn end_keep_alives(self) -> EndKeepAliveIterator
[src]
pub fn end_keep_alives(self) -> EndKeepAliveIterator
pub fn args(self) -> Proj
[src]
pub fn args(self) -> Proj
pub fn no_mem(self) -> NoMem
[src]
pub fn no_mem(self) -> NoMem
pub fn frame(self) -> Node
[src]
pub fn frame(self) -> Node
pub fn dump(self, suffix: &str)
[src]
pub fn dump(self, suffix: &str)
pub fn assure_outs(self)
[src]
pub fn assure_outs(self)
pub fn recompute_outs(self)
[src]
pub fn recompute_outs(self)
pub fn assure_loopinfo(self)
[src]
pub fn assure_loopinfo(self)
pub fn compute_doms(self)
[src]
pub fn compute_doms(self)
pub fn compute_postdoms(self)
[src]
pub fn compute_postdoms(self)
Compute all post dominator information in the graph
NOTE: Also constructs out information NOTE: calling this function multiple times without changing the graph will not recompute information and is cheap.
pub fn remove_bads(self)
[src]
pub fn remove_bads(self)
pub fn remove_critical_cf_edges(self)
[src]
pub fn remove_critical_cf_edges(self)
pub fn remove_unreachable_code(self)
[src]
pub fn remove_unreachable_code(self)
pub fn walk_topological<F>(self, walker: F) where
F: FnMut(&Node),
[src]
pub fn walk_topological<F>(self, walker: F) where
F: FnMut(&Node),
pub fn walk_blkwise_dom_top_down<F>(self, walker: F) where
F: FnMut(&Node),
[src]
pub fn walk_blkwise_dom_top_down<F>(self, walker: F) where
F: FnMut(&Node),
pub fn walk<F>(self, walker: F) where
F: FnMut(&Node),
[src]
pub fn walk<F>(self, walker: F) where
F: FnMut(&Node),
pub fn walk_blocks_postorder<F>(self, walker: F) where
F: FnMut(&Block),
[src]
pub fn walk_blocks_postorder<F>(self, walker: F) where
F: FnMut(&Block),
pub fn walk_dom_tree_postorder<F>(self, walker: F) where
F: FnMut(&Block),
[src]
pub fn walk_dom_tree_postorder<F>(self, walker: F) where
F: FnMut(&Block),
pub fn walk_postdom_tree_postorder<F>(self, walker: F) where
F: FnMut(&Block),
[src]
pub fn walk_postdom_tree_postorder<F>(self, walker: F) where
F: FnMut(&Block),
pub fn walk_blocks<F>(self, walker: F) where
F: FnMut(VisitTime, &Block),
[src]
pub fn walk_blocks<F>(self, walker: F) where
F: FnMut(VisitTime, &Block),
Walks over reachable Block nodes in the graph, starting at the end_block.
For each block, the walker function is called twice, once before and
once after all predecessors of the block are visited. This is indicated
by the VisitTime
parameter to the closure.
Parameters
walker
walker function
Has its own visited flag, so that it can be interleaved with the other walker. Does not use the link field.
pub fn nodes(self) -> Vec<Node>
[src]
pub fn nodes(self) -> Vec<Node>
pub fn exchange(
prev: impl NodeTrait,
new: impl NodeTrait
)
[src]
pub fn exchange(
prev: impl NodeTrait,
new: impl NodeTrait
)
pub fn mark_as_bad(
self,
node: impl NodeTrait
)
[src]
pub fn mark_as_bad(
self,
node: impl NodeTrait
)
Replace the given node with a "bad" node, thus marking it and all the
nodes dominated by it as unreachable. The whole subtree can then be
removed using Graph::remove_bads
.
pub fn copy_node_without_ins(self, node: Node, target: Option<Block>) -> Node
[src]
pub fn copy_node_without_ins(self, node: Node, target: Option<Block>) -> Node
pub fn new_imm_block(self, preds: &[Node]) -> Block
[src]
pub fn new_imm_block(self, preds: &[Node]) -> Block
pub fn slots(self) -> i32
[src]
pub fn slots(self) -> i32
pub fn finalize_construction(self)
[src]
pub fn finalize_construction(self)
impl Graph
[src]
impl Graph
pub fn new_add(
self,
block: Block,
irn_left: impl NodeTrait,
irn_right: impl NodeTrait
) -> Add
[src]
pub fn new_add(
self,
block: Block,
irn_left: impl NodeTrait,
irn_right: impl NodeTrait
) -> Add
Creates a new Add-node.
block
The block.irn_left
leftirn_right
right
pub fn new_address(self, entity: Entity) -> Address
[src]
pub fn new_address(self, entity: Entity) -> Address
Creates a new Address-node.
entity
entity to operate on
pub fn new_align(self, mode: Mode, ty: Ty) -> Align
[src]
pub fn new_align(self, mode: Mode, ty: Ty) -> Align
Creates a new Align-node.
mode
mode of the operations resultty
type to operate on
pub fn new_alloc(
self,
block: Block,
irn_mem: impl NodeTrait,
irn_size: impl NodeTrait,
alignment: c_uint
) -> Alloc
[src]
pub fn new_alloc(
self,
block: Block,
irn_mem: impl NodeTrait,
irn_size: impl NodeTrait,
alignment: c_uint
) -> Alloc
Creates a new Alloc-node.
block
The block.irn_mem
memirn_size
sizealignment
alignment of the memory block (must be a power of 2)
pub fn new_and(
self,
block: Block,
irn_left: impl NodeTrait,
irn_right: impl NodeTrait
) -> And
[src]
pub fn new_and(
self,
block: Block,
irn_left: impl NodeTrait,
irn_right: impl NodeTrait
) -> And
Creates a new And-node.
block
The block.irn_left
leftirn_right
right
pub fn new_bad(self, mode: Mode) -> Bad
[src]
pub fn new_bad(self, mode: Mode) -> Bad
Creates a new Bad-node.
mode
mode of the operations result
pub fn new_bitcast(
self,
block: Block,
irn_op: impl NodeTrait,
mode: Mode
) -> Bitcast
[src]
pub fn new_bitcast(
self,
block: Block,
irn_op: impl NodeTrait,
mode: Mode
) -> Bitcast
Creates a new Bitcast-node.
block
The block.irn_op
opmode
mode of the operations result
pub fn new_block(self, in_: &[Node]) -> Block
[src]
pub fn new_block(self, in_: &[Node]) -> Block
Creates a new Block-node.
in_
additional inputs
pub fn new_builtin(
self,
block: Block,
irn_mem: impl NodeTrait,
in_: &[Node],
kind: Type,
ty: Ty
) -> Builtin
[src]
pub fn new_builtin(
self,
block: Block,
irn_mem: impl NodeTrait,
in_: &[Node],
kind: Type,
ty: Ty
) -> Builtin
Creates a new Builtin-node.
block
The block.irn_mem
memin_
additional inputskind
kind of builtinty
method type for the builtin call
pub fn new_call(
self,
block: Block,
irn_mem: impl NodeTrait,
irn_ptr: impl NodeTrait,
in_: &[Node],
ty: Ty
) -> Call
[src]
pub fn new_call(
self,
block: Block,
irn_mem: impl NodeTrait,
irn_ptr: impl NodeTrait,
in_: &[Node],
ty: Ty
) -> Call
Creates a new Call-node.
block
The block.irn_mem
memirn_ptr
ptrin_
additional inputsty
type of the call (usually type of the called procedure)
pub fn new_cmp(
self,
block: Block,
irn_left: impl NodeTrait,
irn_right: impl NodeTrait,
relation: Type
) -> Cmp
[src]
pub fn new_cmp(
self,
block: Block,
irn_left: impl NodeTrait,
irn_right: impl NodeTrait,
relation: Type
) -> Cmp
Creates a new Cmp-node.
block
The block.irn_left
leftirn_right
rightrelation
Comparison relation
pub fn new_cond(
self,
block: Block,
irn_selector: impl NodeTrait
) -> Cond
[src]
pub fn new_cond(
self,
block: Block,
irn_selector: impl NodeTrait
) -> Cond
Creates a new Cond-node.
block
The block.irn_selector
selector
pub fn new_confirm(
self,
block: Block,
irn_value: impl NodeTrait,
irn_bound: impl NodeTrait,
relation: Type
) -> Confirm
[src]
pub fn new_confirm(
self,
block: Block,
irn_value: impl NodeTrait,
irn_bound: impl NodeTrait,
relation: Type
) -> Confirm
Creates a new Confirm-node.
block
The block.irn_value
valueirn_bound
boundrelation
relation of value to bound
pub fn new_const(self, tarval: Tarval) -> Const
[src]
pub fn new_const(self, tarval: Tarval) -> Const
Creates a new Const-node.
tarval
constant value (a tarval object)
pub fn new_conv(
self,
block: Block,
irn_op: impl NodeTrait,
mode: Mode
) -> Conv
[src]
pub fn new_conv(
self,
block: Block,
irn_op: impl NodeTrait,
mode: Mode
) -> Conv
Creates a new Conv-node.
block
The block.irn_op
opmode
mode of the operations result
pub fn new_copyb(
self,
block: Block,
irn_mem: impl NodeTrait,
irn_dst: impl NodeTrait,
irn_src: impl NodeTrait,
ty: Ty,
flags: Type
) -> CopyB
[src]
pub fn new_copyb(
self,
block: Block,
irn_mem: impl NodeTrait,
irn_dst: impl NodeTrait,
irn_src: impl NodeTrait,
ty: Ty,
flags: Type
) -> CopyB
Creates a new CopyB-node.
block
The block.irn_mem
memirn_dst
dstirn_src
srcty
type of copied dataflags
specifies volatility
pub fn new_div(
self,
block: Block,
irn_mem: impl NodeTrait,
irn_left: impl NodeTrait,
irn_right: impl NodeTrait,
pinned: i32
) -> Div
[src]
pub fn new_div(
self,
block: Block,
irn_mem: impl NodeTrait,
irn_left: impl NodeTrait,
irn_right: impl NodeTrait,
pinned: i32
) -> Div
Creates a new Div-node.
block
The block.irn_mem
memirn_left
leftirn_right
rightpinned
pinned state
pub fn new_dummy(self, mode: Mode) -> Dummy
[src]
pub fn new_dummy(self, mode: Mode) -> Dummy
Creates a new Dummy-node.
mode
mode of the operations result
pub fn new_end(self, in_: &[Node]) -> End
[src]
pub fn new_end(self, in_: &[Node]) -> End
Creates a new End-node.
in_
additional inputs
pub fn new_eor(
self,
block: Block,
irn_left: impl NodeTrait,
irn_right: impl NodeTrait
) -> Eor
[src]
pub fn new_eor(
self,
block: Block,
irn_left: impl NodeTrait,
irn_right: impl NodeTrait
) -> Eor
Creates a new Eor-node.
block
The block.irn_left
leftirn_right
right
pub fn new_free(
self,
block: Block,
irn_mem: impl NodeTrait,
irn_ptr: impl NodeTrait
) -> Free
[src]
pub fn new_free(
self,
block: Block,
irn_mem: impl NodeTrait,
irn_ptr: impl NodeTrait
) -> Free
Creates a new Free-node.
block
The block.irn_mem
memirn_ptr
ptr
pub fn new_ijmp(
self,
block: Block,
irn_target: impl NodeTrait
) -> IJmp
[src]
pub fn new_ijmp(
self,
block: Block,
irn_target: impl NodeTrait
) -> IJmp
Creates a new IJmp-node.
block
The block.irn_target
target
pub fn new_jmp(self, block: Block) -> Jmp
[src]
pub fn new_jmp(self, block: Block) -> Jmp
Creates a new Jmp-node.
block
The block.
pub fn new_load(
self,
block: Block,
irn_mem: impl NodeTrait,
irn_ptr: impl NodeTrait,
mode: Mode,
ty: Ty,
flags: Type
) -> Load
[src]
pub fn new_load(
self,
block: Block,
irn_mem: impl NodeTrait,
irn_ptr: impl NodeTrait,
mode: Mode,
ty: Ty,
flags: Type
) -> Load
Creates a new Load-node.
block
The block.irn_mem
memirn_ptr
ptrmode
mode of the value to be loadedty
The type of the object which is stored at ptr (need not match with mode)flags
specifies alignment, volatility and pin state
pub fn new_member(
self,
block: Block,
irn_ptr: impl NodeTrait,
entity: Entity
) -> Member
[src]
pub fn new_member(
self,
block: Block,
irn_ptr: impl NodeTrait,
entity: Entity
) -> Member
Creates a new Member-node.
block
The block.irn_ptr
ptrentity
entity which is selected
pub fn new_minus(
self,
block: Block,
irn_op: impl NodeTrait
) -> Minus
[src]
pub fn new_minus(
self,
block: Block,
irn_op: impl NodeTrait
) -> Minus
Creates a new Minus-node.
block
The block.irn_op
op
pub fn new_mod(
self,
block: Block,
irn_mem: impl NodeTrait,
irn_left: impl NodeTrait,
irn_right: impl NodeTrait,
pinned: i32
) -> Mod
[src]
pub fn new_mod(
self,
block: Block,
irn_mem: impl NodeTrait,
irn_left: impl NodeTrait,
irn_right: impl NodeTrait,
pinned: i32
) -> Mod
Creates a new Mod-node.
block
The block.irn_mem
memirn_left
leftirn_right
rightpinned
pinned state
pub fn new_mul(
self,
block: Block,
irn_left: impl NodeTrait,
irn_right: impl NodeTrait
) -> Mul
[src]
pub fn new_mul(
self,
block: Block,
irn_left: impl NodeTrait,
irn_right: impl NodeTrait
) -> Mul
Creates a new Mul-node.
block
The block.irn_left
leftirn_right
right
pub fn new_mulh(
self,
block: Block,
irn_left: impl NodeTrait,
irn_right: impl NodeTrait
) -> Mulh
[src]
pub fn new_mulh(
self,
block: Block,
irn_left: impl NodeTrait,
irn_right: impl NodeTrait
) -> Mulh
Creates a new Mulh-node.
block
The block.irn_left
leftirn_right
right
pub fn new_mux(
self,
block: Block,
irn_sel: impl NodeTrait,
irn_false: impl NodeTrait,
irn_true: impl NodeTrait
) -> Mux
[src]
pub fn new_mux(
self,
block: Block,
irn_sel: impl NodeTrait,
irn_false: impl NodeTrait,
irn_true: impl NodeTrait
) -> Mux
Creates a new Mux-node.
block
The block.irn_sel
selirn_false
falseirn_true
true
pub fn new_nomem(self) -> NoMem
[src]
pub fn new_nomem(self) -> NoMem
Creates a new NoMem-node.
pub fn new_not(
self,
block: Block,
irn_op: impl NodeTrait
) -> Not
[src]
pub fn new_not(
self,
block: Block,
irn_op: impl NodeTrait
) -> Not
Creates a new Not-node.
block
The block.irn_op
op
pub fn new_offset(self, mode: Mode, entity: Entity) -> Offset
[src]
pub fn new_offset(self, mode: Mode, entity: Entity) -> Offset
Creates a new Offset-node.
mode
mode of the operations resultentity
entity to operate on
pub fn new_or(
self,
block: Block,
irn_left: impl NodeTrait,
irn_right: impl NodeTrait
) -> Or
[src]
pub fn new_or(
self,
block: Block,
irn_left: impl NodeTrait,
irn_right: impl NodeTrait
) -> Or
Creates a new Or-node.
block
The block.irn_left
leftirn_right
right
pub fn new_phi(self, block: Block, in_: &[Node], mode: Mode) -> Phi
[src]
pub fn new_phi(self, block: Block, in_: &[Node], mode: Mode) -> Phi
Creates a new Phi-node.
block
The block.in_
additional inputsmode
mode of the operations result
pub fn new_pin(
self,
block: Block,
irn_op: impl NodeTrait
) -> Pin
[src]
pub fn new_pin(
self,
block: Block,
irn_op: impl NodeTrait
) -> Pin
Creates a new Pin-node.
block
The block.irn_op
op
pub fn new_proj(
self,
irn_pred: impl NodeTrait,
mode: Mode,
num: c_uint
) -> Proj
[src]
pub fn new_proj(
self,
irn_pred: impl NodeTrait,
mode: Mode,
num: c_uint
) -> Proj
Creates a new Proj-node.
irn_pred
predmode
mode of the operations resultnum
number of tuple component to be extracted
pub fn new_raise(
self,
block: Block,
irn_mem: impl NodeTrait,
irn_exo_ptr: impl NodeTrait
) -> Raise
[src]
pub fn new_raise(
self,
block: Block,
irn_mem: impl NodeTrait,
irn_exo_ptr: impl NodeTrait
) -> Raise
Creates a new Raise-node.
block
The block.irn_mem
memirn_exo_ptr
exo_ptr
pub fn new_return(
self,
block: Block,
irn_mem: impl NodeTrait,
in_: &[Node]
) -> Return
[src]
pub fn new_return(
self,
block: Block,
irn_mem: impl NodeTrait,
in_: &[Node]
) -> Return
Creates a new Return-node.
block
The block.irn_mem
memin_
additional inputs
pub fn new_sel(
self,
block: Block,
irn_ptr: impl NodeTrait,
irn_index: impl NodeTrait,
ty: Ty
) -> Sel
[src]
pub fn new_sel(
self,
block: Block,
irn_ptr: impl NodeTrait,
irn_index: impl NodeTrait,
ty: Ty
) -> Sel
Creates a new Sel-node.
block
The block.irn_ptr
ptrirn_index
indexty
array type
pub fn new_shl(
self,
block: Block,
irn_left: impl NodeTrait,
irn_right: impl NodeTrait
) -> Shl
[src]
pub fn new_shl(
self,
block: Block,
irn_left: impl NodeTrait,
irn_right: impl NodeTrait
) -> Shl
Creates a new Shl-node.
block
The block.irn_left
leftirn_right
right
pub fn new_shr(
self,
block: Block,
irn_left: impl NodeTrait,
irn_right: impl NodeTrait
) -> Shr
[src]
pub fn new_shr(
self,
block: Block,
irn_left: impl NodeTrait,
irn_right: impl NodeTrait
) -> Shr
Creates a new Shr-node.
block
The block.irn_left
leftirn_right
right
pub fn new_shrs(
self,
block: Block,
irn_left: impl NodeTrait,
irn_right: impl NodeTrait
) -> Shrs
[src]
pub fn new_shrs(
self,
block: Block,
irn_left: impl NodeTrait,
irn_right: impl NodeTrait
) -> Shrs
Creates a new Shrs-node.
block
The block.irn_left
leftirn_right
right
pub fn new_size(self, mode: Mode, ty: Ty) -> Size
[src]
pub fn new_size(self, mode: Mode, ty: Ty) -> Size
Creates a new Size-node.
mode
mode of the operations resultty
type to operate on
pub fn new_start(self) -> Start
[src]
pub fn new_start(self) -> Start
Creates a new Start-node.
pub fn new_store(
self,
block: Block,
irn_mem: impl NodeTrait,
irn_ptr: impl NodeTrait,
irn_value: impl NodeTrait,
ty: Ty,
flags: Type
) -> Store
[src]
pub fn new_store(
self,
block: Block,
irn_mem: impl NodeTrait,
irn_ptr: impl NodeTrait,
irn_value: impl NodeTrait,
ty: Ty,
flags: Type
) -> Store
Creates a new Store-node.
block
The block.irn_mem
memirn_ptr
ptrirn_value
valuety
The type of the object which is stored at ptr (need not match with value's type)flags
specifies alignment, volatility and pin state
pub fn new_sub(
self,
block: Block,
irn_left: impl NodeTrait,
irn_right: impl NodeTrait
) -> Sub
[src]
pub fn new_sub(
self,
block: Block,
irn_left: impl NodeTrait,
irn_right: impl NodeTrait
) -> Sub
Creates a new Sub-node.
block
The block.irn_left
leftirn_right
right
pub fn new_switch(
self,
block: Block,
irn_selector: impl NodeTrait,
n_outs: c_uint,
table: *mut ir_switch_table
) -> Switch
[src]
pub fn new_switch(
self,
block: Block,
irn_selector: impl NodeTrait,
n_outs: c_uint,
table: *mut ir_switch_table
) -> Switch
Creates a new Switch-node.
block
The block.irn_selector
selectorn_outs
number of outputs (including pn_Switch_default)table
table describing mapping from input values to Proj numbers
pub fn new_sync(self, block: Block, in_: &[Node]) -> Sync
[src]
pub fn new_sync(self, block: Block, in_: &[Node]) -> Sync
Creates a new Sync-node.
block
The block.in_
additional inputs
pub fn new_tuple(self, block: Block, in_: &[Node]) -> Tuple
[src]
pub fn new_tuple(self, block: Block, in_: &[Node]) -> Tuple
Creates a new Tuple-node.
block
The block.in_
additional inputs
pub fn new_unknown(self, mode: Mode) -> Unknown
[src]
pub fn new_unknown(self, mode: Mode) -> Unknown
Creates a new Unknown-node.
mode
mode of the operations result
Trait Implementations
impl From<*mut ir_graph> for Graph
[src]
impl From<*mut ir_graph> for Graph
impl Clone for Graph
[src]
impl Clone for Graph
fn clone(&self) -> Graph
[src]
fn clone(&self) -> Graph
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Copy for Graph
[src]
impl Copy for Graph
impl Into<*mut ir_graph> for Graph
[src]
impl Into<*mut ir_graph> for Graph
impl Into<*const ir_graph> for Graph
[src]
impl Into<*const ir_graph> for Graph
impl Debug for Graph
[src]
impl Debug for Graph
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId