X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fcommon%2Firtools.c;h=7696d445dd95a22b3c49c1af820a52a9c87ad704;hb=533faf35a5f51a6ac3548e7f64aadd7b59b371d3;hp=1e3e9ef30385966c11f2819f9e719f68064f7ed7;hpb=0fbcef83aa6060534172bb13e71cdadb04428806;p=libfirm diff --git a/ir/common/irtools.c b/ir/common/irtools.c index 1e3e9ef30..7696d445d 100644 --- a/ir/common/irtools.c +++ b/ir/common/irtools.c @@ -39,6 +39,16 @@ void firm_clear_link(ir_node *n, void *env) { set_irn_link(n, NULL); } +/* the famous clear_node_and_phi_links() implementation. */ +void firm_clear_node_and_phi_links(ir_node *n, void *env) { + (void) env; + set_irn_link(n, NULL); + if (is_Block(n)) + set_Block_phis(n, NULL); + else if (is_Phi(n)) + set_Phi_next(n, NULL); +} + /* * Copies a node to a new irg. The Ins of the new node point to * the predecessors on the old irg. n->link points to the new node.