Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
1ebb96b9
Commit
1ebb96b9
authored
Mar 08, 2013
by
Matthias Braun
Browse files
irdom: move for_each macros to internal API
parent
bcf76b40
Changes
2
Show whitespace changes
Inline
Side-by-side
include/libfirm/irdom.h
View file @
1ebb96b9
...
@@ -109,26 +109,6 @@ FIRM_API ir_node *get_Block_dominated_next(const ir_node *node);
...
@@ -109,26 +109,6 @@ FIRM_API ir_node *get_Block_dominated_next(const ir_node *node);
*/
*/
FIRM_API
ir_node
*
get_Block_postdominated_next
(
const
ir_node
*
node
);
FIRM_API
ir_node
*
get_Block_postdominated_next
(
const
ir_node
*
node
);
/**
* Iterate over all nodes which are immediately dominated by a given
* node.
* @param bl The block whose dominated blocks shall be iterated on.
* @param curr An iterator variable of type ir_node*
*/
#define dominates_for_each(bl,curr) \
for(curr = get_Block_dominated_first(bl); curr; \
curr = get_Block_dominated_next(curr))
/**
* Iterate over all nodes which are immediately post dominated by a given
* node.
* @param bl The block whose post dominated blocks shall be iterated on.
* @param curr An iterator variable of type ir_node*
*/
#define postdominates_for_each(bl,curr) \
for(curr = get_Block_postdominated_first(bl); curr; \
curr = get_Block_postdominated_next(curr))
/**
/**
* Returns the smallest common dominator block of two nodes.
* Returns the smallest common dominator block of two nodes.
* @param a A node.
* @param a A node.
...
...
ir/ana/irdom_t.h
View file @
1ebb96b9
...
@@ -59,4 +59,24 @@ unsigned get_Block_pdom_max_subtree_pre_num(const ir_node *bl);
...
@@ -59,4 +59,24 @@ unsigned get_Block_pdom_max_subtree_pre_num(const ir_node *bl);
void
ir_free_dominance_frontiers
(
ir_graph
*
irg
);
void
ir_free_dominance_frontiers
(
ir_graph
*
irg
);
/**
* Iterate over all nodes which are immediately dominated by a given
* node.
* @param block The block whose dominated blocks shall be iterated on.
* @param curr Name for an ir_node* iterator variable (will be declared)
*/
#define dominates_for_each(block, curr) \
for(ir_node *curr = get_Block_dominated_first(block); curr != NULL; \
curr = get_Block_dominated_next(curr))
/**
* Iterate over all nodes which are immediately post dominated by a given
* node.
* @param block The block whose post dominated blocks shall be iterated on.
* @param curr Name for an ir_node *iterator variable (will be declared)
*/
#define postdominates_for_each(block, curr) \
for(ir_node *curr = get_Block_postdominated_first(block); curr != NULL; \
curr = get_Block_postdominated_next(curr))
#endif
#endif
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment