libFirm
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
irdom.h
1 /*
2  * This file is part of libFirm.
3  * Copyright (C) 2012 University of Karlsruhe.
4  */
5 
13 #ifndef FIRM_ANA_IRDOM_H
14 #define FIRM_ANA_IRDOM_H
15 
16 #include "firm_types.h"
17 #include "begin.h"
18 
37 FIRM_API ir_node *get_Block_idom(const ir_node *block);
38 
40 FIRM_API ir_node *get_Block_ipostdom(const ir_node *block);
41 
43 int get_Block_dom_depth(const ir_node *bl);
44 
46 int get_Block_postdom_depth(const ir_node *bl);
47 
56 FIRM_API int block_dominates(const ir_node *a, const ir_node *b);
57 
66 FIRM_API int block_postdominates(const ir_node *a, const ir_node *b);
67 
76 FIRM_API int block_strictly_postdominates(const ir_node *a, const ir_node *b);
77 
89 FIRM_API ir_node *get_Block_dominated_first(const ir_node *block);
93 FIRM_API ir_node *get_Block_postdominated_first(const ir_node *bl);
94 
102 FIRM_API ir_node *get_Block_dominated_next(const ir_node *node);
106 FIRM_API ir_node *get_Block_postdominated_next(const ir_node *node);
107 
114 FIRM_API ir_node *ir_deepest_common_dominator(ir_node *block0, ir_node *block1);
115 
125 FIRM_API void dom_tree_walk(ir_node *n, irg_walk_func *pre,
126  irg_walk_func *post, void *env);
127 
137 FIRM_API void postdom_tree_walk(ir_node *n, irg_walk_func *pre,
138  irg_walk_func *post, void *env);
139 
147 FIRM_API void dom_tree_walk_irg(ir_graph *irg, irg_walk_func *pre,
148  irg_walk_func *post, void *env);
149 
157 FIRM_API void postdom_tree_walk_irg(ir_graph *irg, irg_walk_func *pre,
158  irg_walk_func *post, void *env);
159 
175 FIRM_API void compute_doms(ir_graph *irg);
176 
192 FIRM_API void compute_postdoms(ir_graph *irg);
193 
198 FIRM_API void ir_compute_dominance_frontiers(ir_graph *irg);
199 
206 FIRM_API ir_node **ir_get_dominance_frontier(const ir_node *block);
207 
210 #include "end.h"
211 
212 #endif
ir_node * get_Block_idom(const ir_node *block)
return immediate dominator of block
ir_node * get_Block_postdominated_first(const ir_node *bl)
Returns the first node in the list of nodes postdominated by a given blcok.
void compute_postdoms(ir_graph *irg)
Computes the post dominance relation for all basic blocks of a given graph.
int get_Block_dom_depth(const ir_node *bl)
int block_postdominates(const ir_node *a, const ir_node *b)
Check, if a block post dominates another block.
void dom_tree_walk(ir_node *n, irg_walk_func *pre, irg_walk_func *post, void *env)
Visit all nodes in the dominator subtree of a given node.
ir_node ** ir_get_dominance_frontier(const ir_node *block)
Get the dominance frontier of a block.
ir_node * get_Block_postdominated_next(const ir_node *node)
Returns the next node in a list of nodes which are postdominated by another node. ...
ir_node * get_Block_dominated_first(const ir_node *block)
Returns the first node in the list of nodes dominated by a given block.
struct ir_graph ir_graph
Procedure Graph.
Definition: firm_types.h:74
struct ir_node ir_node
Procedure Graph Node.
Definition: firm_types.h:53
int block_dominates(const ir_node *a, const ir_node *b)
Check, if a block dominates another block.
ir_node * get_Block_ipostdom(const ir_node *block)
return immediate postdominator of a block
void postdom_tree_walk(ir_node *n, irg_walk_func *pre, irg_walk_func *post, void *env)
Visit all nodes in the post dominator subtree of a given node.
ir_node * get_Block_dominated_next(const ir_node *node)
Returns the next node in a list of nodes which are dominated by some other node.
void compute_doms(ir_graph *irg)
Computes the dominance relation for all basic blocks of a given graph.
void ir_compute_dominance_frontiers(ir_graph *irg)
Compute the dominance frontiers for a given graph.
ir_node * ir_deepest_common_dominator(ir_node *block0, ir_node *block1)
Returns the deepest common dominator of two blocks.
int block_strictly_postdominates(const ir_node *a, const ir_node *b)
Check, if a block strictly post dominates another block, i.e.
void irg_walk_func(ir_node *, void *)
type for graph-walk callbacks
Definition: firm_types.h:97
void dom_tree_walk_irg(ir_graph *irg, irg_walk_func *pre, irg_walk_func *post, void *env)
Walk over the dominator tree of an irg starting at the root.
int get_Block_postdom_depth(const ir_node *bl)
void postdom_tree_walk_irg(ir_graph *irg, irg_walk_func *pre, irg_walk_func *post, void *env)
Walk over the post dominator tree of an irg starting at the root.