Commit c9639aae by Zdenek Dvorak Committed by Zdenek Dvorak

re PR tree-optimization/24226 (ICE: Segmentation fault in operand_equal_p…

re PR tree-optimization/24226 (ICE: Segmentation fault in operand_equal_p (complete loop unrolling))

	PR tree-optimization/24226
	* tree-cfg.c (remove_bb): Clean up unreachable loops.
	* tree-flow.h (free_numbers_of_iterations_estimates_loop): Declare.
	* tree-ssa-loop-niter.c (free_numbers_of_iterations_estimates_loop):
	Export.

From-SVN: r105151
parent ed883fe3
2005-10-09 Zdenek Dvorak <dvorakz@suse.cz>
PR tree-optimization/24226
* tree-cfg.c (remove_bb): Clean up unreachable loops.
* tree-flow.h (free_numbers_of_iterations_estimates_loop): Declare.
* tree-ssa-loop-niter.c (free_numbers_of_iterations_estimates_loop):
Export.
2005-10-09 Eric Botcazou <ebotcazou@libertysurf.fr> 2005-10-09 Eric Botcazou <ebotcazou@libertysurf.fr>
* config/sparc/gmon-sol2.c (internal_mcount): Mark as used. * config/sparc/gmon-sol2.c (internal_mcount): Mark as used.
......
...@@ -2020,6 +2020,12 @@ remove_bb (basic_block bb) ...@@ -2020,6 +2020,12 @@ remove_bb (basic_block bb)
{ {
loop->latch = NULL; loop->latch = NULL;
loop->header = NULL; loop->header = NULL;
/* Also clean up the information associated with the loop. Updating
it would waste time. More importantly, it may refer to ssa
names that were defined in other removed basic block -- these
ssa names are now removed and invalid. */
free_numbers_of_iterations_estimates_loop (loop);
} }
} }
......
...@@ -735,6 +735,7 @@ bool scev_probably_wraps_p (tree, tree, tree, tree, struct loop *, bool *, ...@@ -735,6 +735,7 @@ bool scev_probably_wraps_p (tree, tree, tree, tree, struct loop *, bool *,
bool *); bool *);
tree convert_step (struct loop *, tree, tree, tree, tree); tree convert_step (struct loop *, tree, tree, tree, tree);
void free_numbers_of_iterations_estimates (struct loops *); void free_numbers_of_iterations_estimates (struct loops *);
void free_numbers_of_iterations_estimates_loop (struct loop *);
void rewrite_into_loop_closed_ssa (bitmap, unsigned); void rewrite_into_loop_closed_ssa (bitmap, unsigned);
void verify_loop_closed_ssa (void); void verify_loop_closed_ssa (void);
void loop_commit_inserts (void); void loop_commit_inserts (void);
......
...@@ -2007,11 +2007,13 @@ convert_step (struct loop *loop, tree new_type, tree base, tree step, ...@@ -2007,11 +2007,13 @@ convert_step (struct loop *loop, tree new_type, tree base, tree step,
/* Frees the information on upper bounds on numbers of iterations of LOOP. */ /* Frees the information on upper bounds on numbers of iterations of LOOP. */
static void void
free_numbers_of_iterations_estimates_loop (struct loop *loop) free_numbers_of_iterations_estimates_loop (struct loop *loop)
{ {
struct nb_iter_bound *bound, *next; struct nb_iter_bound *bound, *next;
loop->nb_iterations = NULL;
loop->estimated_nb_iterations = NULL;
for (bound = loop->bounds; bound; bound = next) for (bound = loop->bounds; bound; bound = next)
{ {
next = bound->next; next = bound->next;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment