* @author Martin Trapp, Christian Schaefer, Goetz Lindenmaier
* @version $Id$
*/
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
+#include "config.h"
#include "irvrfy.h"
#include "irflag_t.h"
}
}
-/**
- * clear all links, including the Phi list of blocks and Phi nodes.
- */
-static void clear_node_and_phis_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);
-}
-
void collect_phiprojs(ir_graph *irg) {
- irg_walk_graph(irg, clear_node_and_phis_links, collect_phiprojs_walker, NULL);
+ assert((ir_resources_reserved(irg) & (IR_RESOURCE_IRN_LINK|IR_RESOURCE_PHI_LIST)) ==
+ (IR_RESOURCE_IRN_LINK|IR_RESOURCE_PHI_LIST));
+ irg_walk_graph(irg, firm_clear_node_and_phi_links, collect_phiprojs_walker, NULL);
}
/*--------------------------------------------------------------------*/