X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fana%2Firdom.h;h=3ff303759a3e7ebe44518cce2676e6888c338540;hb=4bad1346ff2abc3923beea23e5ac949acc7ca514;hp=fadfe750268d76e8f495302caedded1454c08a75;hpb=c84df20a77cee7031432836dc18d7cf0f7c6bc23;p=libfirm diff --git a/ir/ana/irdom.h b/ir/ana/irdom.h index fadfe7502..3ff303759 100644 --- a/ir/ana/irdom.h +++ b/ir/ana/irdom.h @@ -88,6 +88,16 @@ ir_node *get_Block_dominated_first(const ir_node *bl); */ ir_node *get_Block_dominated_next(const ir_node *dom); +/** + * 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)) + /** * Check, if a block dominates another block. * @param a The first block.