used new verify_node operation
[libfirm] / ir / ir / irgopt.c
index 315da6b..e41b3d4 100644 (file)
 #include "irloop_t.h"
 #include "irbackedge_t.h"
 #include "cgana.h"
+#include "trouts.h"
 
 #include "irflag_t.h"
 #include "irhooks.h"
+#include "iredges_t.h"
 
 /* Defined in iropt.c */
 pset *new_identities (void);
@@ -113,7 +115,6 @@ void local_optimize_node(ir_node *n) {
   do_local_optimize(n);
 
   current_ir_graph = rem;
-
 }
 
 void
@@ -266,7 +267,7 @@ firm_copy_node (ir_node *n, void *env) {
  * Copies new predecessors of old node to new node remembered in link.
  * Spare the Bad predecessors of Phi and Block nodes.
  */
-static void
+void
 copy_preds (ir_node *n, void *env) {
   ir_node *nn, *block;
   int i, j, irn_arity;
@@ -509,6 +510,8 @@ dead_node_elimination(ir_graph *irg) {
   struct obstack *graveyard_obst = NULL;
   struct obstack *rebirth_obst   = NULL;
 
+       edges_init_graph(irg);
+
   /* inform statistics that we started a dead-node elimination run */
   hook_dead_node_elim_start(irg);
 
@@ -521,6 +524,7 @@ dead_node_elimination(ir_graph *irg) {
   assert(get_irg_phase_state(current_ir_graph) != phase_building);
   free_callee_info(current_ir_graph);
   free_outs(current_ir_graph);
+  free_trouts();
   /* @@@ so far we loose loops when copying */
   free_loop_information(current_ir_graph);