clear inside irgwalk flag when dumping (otherwise we cannot dump inside an irgwalk)
authorChristian Würdig <chriswue@ipd.info.uni-karlsruhe.de>
Wed, 24 Jan 2007 15:57:39 +0000 (15:57 +0000)
committerChristian Würdig <chriswue@ipd.info.uni-karlsruhe.de>
Wed, 24 Jan 2007 15:57:39 +0000 (15:57 +0000)
[r8556]

ir/ir/irdump.c

index 38b9260..b21c665 100644 (file)
@@ -578,10 +578,15 @@ static void collect_node(ir_node * node, void *env) {
  * Free the list with DEL_ARR_F().
  */
 static ir_node **construct_block_lists(ir_graph *irg) {
-       int i, rem_view = get_interprocedural_view();
-       ir_graph *rem = current_ir_graph;
+       int      i;
+       int      rem_view  = get_interprocedural_view();
+       int      walk_flag = inside_irg_walk(irg);
+       ir_graph *rem      = current_ir_graph;
+
        current_ir_graph = irg;
 
+       clear_inside_irg_walk(current_ir_graph);
+
        for (i = get_irp_n_irgs() - 1; i >= 0; --i)
                ird_set_irg_link(get_irp_irg(i), NULL);
 
@@ -597,6 +602,9 @@ static ir_node **construct_block_lists(ir_graph *irg) {
 
        set_interprocedural_view(rem_view);
 
+       if (walk_flag)
+               set_inside_irg_walk(current_ir_graph);
+
        current_ir_graph = rem;
        return ird_get_irg_link(irg);
 }