[−][src]Struct libfirm_rs::Graph
Methods
impl Graph[src]
impl Graphpub fn function_with_entity(entity: Entity, num_slots: usize) -> Self[src]
pub fn function_with_entity(entity: Entity, num_slots: usize) -> Selfpub fn entity(self) -> Entity[src]
pub fn entity(self) -> Entitypub fn start_block(self) -> Block[src]
pub fn start_block(self) -> Blockpub fn end_block(self) -> Block[src]
pub fn end_block(self) -> Blockpub fn start(self) -> Start[src]
pub fn start(self) -> Startpub 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) -> EndKeepAliveIteratorpub fn args(self) -> Proj[src]
pub fn args(self) -> Projpub fn no_mem(self) -> NoMem[src]
pub fn no_mem(self) -> NoMempub fn frame(self) -> Node[src]
pub fn frame(self) -> Nodepub 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
walkerwalker 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>) -> Nodepub fn new_imm_block(self, preds: &[Node]) -> Block[src]
pub fn new_imm_block(self, preds: &[Node]) -> Blockpub fn slots(self) -> i32[src]
pub fn slots(self) -> i32pub fn finalize_construction(self)[src]
pub fn finalize_construction(self)impl Graph[src]
impl Graphpub 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
) -> AddCreates a new Add-node.
blockThe block.irn_leftleftirn_rightright
pub fn new_address(self, entity: Entity) -> Address[src]
pub fn new_address(self, entity: Entity) -> AddressCreates a new Address-node.
entityentity to operate on
pub fn new_align(self, mode: Mode, ty: Ty) -> Align[src]
pub fn new_align(self, mode: Mode, ty: Ty) -> AlignCreates a new Align-node.
modemode of the operations resulttytype 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
) -> AllocCreates a new Alloc-node.
blockThe block.irn_memmemirn_sizesizealignmentalignment 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
) -> AndCreates a new And-node.
blockThe block.irn_leftleftirn_rightright
pub fn new_bad(self, mode: Mode) -> Bad[src]
pub fn new_bad(self, mode: Mode) -> BadCreates a new Bad-node.
modemode 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
) -> BitcastCreates a new Bitcast-node.
blockThe block.irn_opopmodemode of the operations result
pub fn new_block(self, in_: &[Node]) -> Block[src]
pub fn new_block(self, in_: &[Node]) -> BlockCreates 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
) -> BuiltinCreates a new Builtin-node.
blockThe block.irn_memmemin_additional inputskindkind of builtintymethod 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
) -> CallCreates a new Call-node.
blockThe block.irn_memmemirn_ptrptrin_additional inputstytype 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
) -> CmpCreates a new Cmp-node.
blockThe block.irn_leftleftirn_rightrightrelationComparison 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
) -> CondCreates a new Cond-node.
blockThe block.irn_selectorselector
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
) -> ConfirmCreates a new Confirm-node.
blockThe block.irn_valuevalueirn_boundboundrelationrelation of value to bound
pub fn new_const(self, tarval: Tarval) -> Const[src]
pub fn new_const(self, tarval: Tarval) -> ConstCreates a new Const-node.
tarvalconstant 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
) -> ConvCreates a new Conv-node.
blockThe block.irn_opopmodemode 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
) -> CopyBCreates a new CopyB-node.
blockThe block.irn_memmemirn_dstdstirn_srcsrctytype of copied dataflagsspecifies 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
) -> DivCreates a new Div-node.
blockThe block.irn_memmemirn_leftleftirn_rightrightpinnedpinned state
pub fn new_dummy(self, mode: Mode) -> Dummy[src]
pub fn new_dummy(self, mode: Mode) -> DummyCreates a new Dummy-node.
modemode of the operations result
pub fn new_end(self, in_: &[Node]) -> End[src]
pub fn new_end(self, in_: &[Node]) -> EndCreates 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
) -> EorCreates a new Eor-node.
blockThe block.irn_leftleftirn_rightright
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
) -> FreeCreates a new Free-node.
blockThe block.irn_memmemirn_ptrptr
pub fn new_ijmp(
self,
block: Block,
irn_target: impl NodeTrait
) -> IJmp[src]
pub fn new_ijmp(
self,
block: Block,
irn_target: impl NodeTrait
) -> IJmpCreates a new IJmp-node.
blockThe block.irn_targettarget
pub fn new_jmp(self, block: Block) -> Jmp[src]
pub fn new_jmp(self, block: Block) -> JmpCreates a new Jmp-node.
blockThe 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
) -> LoadCreates a new Load-node.
blockThe block.irn_memmemirn_ptrptrmodemode of the value to be loadedtyThe type of the object which is stored at ptr (need not match with mode)flagsspecifies 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
) -> MemberCreates a new Member-node.
blockThe block.irn_ptrptrentityentity 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
) -> MinusCreates a new Minus-node.
blockThe block.irn_opop
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
) -> ModCreates a new Mod-node.
blockThe block.irn_memmemirn_leftleftirn_rightrightpinnedpinned 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
) -> MulCreates a new Mul-node.
blockThe block.irn_leftleftirn_rightright
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
) -> MulhCreates a new Mulh-node.
blockThe block.irn_leftleftirn_rightright
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
) -> MuxCreates a new Mux-node.
blockThe block.irn_selselirn_falsefalseirn_truetrue
pub fn new_nomem(self) -> NoMem[src]
pub fn new_nomem(self) -> NoMemCreates 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
) -> NotCreates a new Not-node.
blockThe block.irn_opop
pub fn new_offset(self, mode: Mode, entity: Entity) -> Offset[src]
pub fn new_offset(self, mode: Mode, entity: Entity) -> OffsetCreates a new Offset-node.
modemode of the operations resultentityentity 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
) -> OrCreates a new Or-node.
blockThe block.irn_leftleftirn_rightright
pub fn new_phi(self, block: Block, in_: &[Node], mode: Mode) -> Phi[src]
pub fn new_phi(self, block: Block, in_: &[Node], mode: Mode) -> PhiCreates a new Phi-node.
blockThe block.in_additional inputsmodemode 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
) -> PinCreates a new Pin-node.
blockThe block.irn_opop
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
) -> ProjCreates a new Proj-node.
irn_predpredmodemode of the operations resultnumnumber 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
) -> RaiseCreates a new Raise-node.
blockThe block.irn_memmemirn_exo_ptrexo_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]
) -> ReturnCreates a new Return-node.
blockThe block.irn_memmemin_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
) -> SelCreates a new Sel-node.
blockThe block.irn_ptrptrirn_indexindextyarray 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
) -> ShlCreates a new Shl-node.
blockThe block.irn_leftleftirn_rightright
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
) -> ShrCreates a new Shr-node.
blockThe block.irn_leftleftirn_rightright
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
) -> ShrsCreates a new Shrs-node.
blockThe block.irn_leftleftirn_rightright
pub fn new_size(self, mode: Mode, ty: Ty) -> Size[src]
pub fn new_size(self, mode: Mode, ty: Ty) -> SizeCreates a new Size-node.
modemode of the operations resulttytype to operate on
pub fn new_start(self) -> Start[src]
pub fn new_start(self) -> StartCreates 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
) -> StoreCreates a new Store-node.
blockThe block.irn_memmemirn_ptrptrirn_valuevaluetyThe type of the object which is stored at ptr (need not match with value's type)flagsspecifies 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
) -> SubCreates a new Sub-node.
blockThe block.irn_leftleftirn_rightright
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
) -> SwitchCreates a new Switch-node.
blockThe block.irn_selectorselectorn_outsnumber of outputs (including pn_Switch_default)tabletable 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]) -> SyncCreates a new Sync-node.
blockThe block.in_additional inputs
pub fn new_tuple(self, block: Block, in_: &[Node]) -> Tuple[src]
pub fn new_tuple(self, block: Block, in_: &[Node]) -> TupleCreates a new Tuple-node.
blockThe block.in_additional inputs
pub fn new_unknown(self, mode: Mode) -> Unknown[src]
pub fn new_unknown(self, mode: Mode) -> UnknownCreates a new Unknown-node.
modemode of the operations result
Trait Implementations
impl From<*mut ir_graph> for Graph[src]
impl From<*mut ir_graph> for Graphimpl Clone for Graph[src]
impl Clone for Graphfn clone(&self) -> Graph[src]
fn clone(&self) -> Graphfn 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 Graphimpl Into<*mut ir_graph> for Graph[src]
impl Into<*mut ir_graph> for Graphimpl Into<*const ir_graph> for Graph[src]
impl Into<*const ir_graph> for Graphimpl Debug for Graph[src]
impl Debug for GraphAuto Trait Implementations
Blanket Implementations
impl<T> From for T[src]
impl<T> From for Timpl<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 Timpl<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