+2013-03-05 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/56525
+ * loop-init.c (fix_loop_structure): Remove loops in two stages,
+ not freeing them until the end.
+
2013-03-05 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* config/s390/s390.h: Define DWARF2_ASM_LINE_DEBUG_INFO.
int record_exits = 0;
loop_iterator li;
struct loop *loop;
- unsigned old_nloops;
+ unsigned old_nloops, i;
timevar_push (TV_LOOP_INIT);
flow_loop_tree_node_add (loop_outer (loop), ploop);
}
- /* Remove the loop and free its data. */
- delete_loop (loop);
+ /* Remove the loop. */
+ loop->header = NULL;
+ flow_loop_tree_node_remove (loop);
}
/* Remember the number of loops so we can return how many new loops
}
}
+ /* Finally free deleted loops. */
+ FOR_EACH_VEC_ELT (*get_loops (), i, loop)
+ if (loop && loop->header == NULL)
+ {
+ (*get_loops ())[i] = NULL;
+ flow_loop_free (loop);
+ }
+
loops_state_clear (LOOPS_NEED_FIXUP);
/* Apply flags to loops. */