There should be no changes ??!!
[libfirm] / testprograms / dead_block_example.c
index 2ff7b31..2c1ad05 100644 (file)
@@ -55,6 +55,10 @@ int main(int argc, char **argv)
   /* init library */
   init_firm ();
   set_opt_constant_folding (1);
+  set_optimize(1);
+  set_opt_cse(1);
+  set_opt_dead_node_elimination(1);
+
 
   /* FIRM was designed for oo languages where all methods belong to a class.
    * For imperative languages like C we view a file as a large class containing
@@ -123,13 +127,23 @@ int main(int argc, char **argv)
   add_in_edge (irg->end_block, x);
   mature_block (irg->end_block);
 
+  /* verify the graph */
+  vrfy_graph(irg);
+
   printf("\nDone building the graph.\n");
+  local_optimize_graph (irg);
+  printf("\nDone local optimization.\n");
+  set_opt_constant_folding (1);
+  set_optimize(0);
+  set_opt_cse(1);
+  dead_node_elimination (irg);
   printf("Dumping the graph and a control flow graph.\n");
+
   dump_ir_block_graph (irg);
   dump_cfg (irg);
 
   printf("use xvcg to view these graphs:\n");
-  printf("/ben/trapp/bin/i486/xvcg GRAPHNAME\n");
+  printf("/ben/goetz/bin/xvcg GRAPHNAME\n");
 
   return (0);
 }