X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fcommon%2Firtools.h;h=fe85e0a447b595c52c9c1b56b2b4d7c64aa97162;hb=c64fe299008a45e1bd3b90656d357a77edbb79c9;hp=afa6e7f0c3c02eb951de23907864add54e5df0f5;hpb=94e9283b212f0f10b460248de945576a0bb61703;p=libfirm diff --git a/ir/common/irtools.h b/ir/common/irtools.h index afa6e7f0c..fe85e0a44 100644 --- a/ir/common/irtools.h +++ b/ir/common/irtools.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved. + * Copyright (C) 1995-2011 University of Karlsruhe. All right reserved. * * This file is part of libFirm. * @@ -59,7 +59,7 @@ lc_opt_entry_t *firm_opt_get_root(void); /** * convert a pointer into an integer */ -#define PTR_TO_INT(v) ((int)((char *)(v) - (char *)0)) +#define PTR_TO_INT(v) (((char *)(v) - (char *)0)) /** * Dump a pset containing Firm objects. @@ -77,10 +77,23 @@ void firm_clear_link(ir_node *n, void *env); * The famous clear_link_and_block_lists() walker-function. * Sets all links fields of visited nodes to NULL. * Additionally, clear all Phi-lists of visited blocks. - * Do not implement it by yourself, use this one + * Do not implement it by yourself, use this one. */ void firm_clear_node_and_phi_links(ir_node *n, void *env); +/** + * Walker function, sets all phi list heads fields of visited Blocks + * to NULL. + * Use in conjunction with firm_collect_block_phis(). + */ +void firm_clear_block_phis(ir_node *node, void *env); + +/** + * Walker function, links all visited Phi nodes into its block links. + * Use in conjunction with firm_clear_block_phis(). + */ +void firm_collect_block_phis(ir_node *node, void *env); + /** * Creates an exact copy of a node with same inputs and attributes in the * same block.