From 0ab72b537f7f56b9c283befc916be4d8af6fefca Mon Sep 17 00:00:00 2001 From: jakub Date: Sat, 20 Aug 2011 07:48:35 +0000 Subject: PR tree-optimization/48739 * tree-ssa.c: Include cfgloop.h. (execute_update_addresses_taken): When updating ssa, if in loop closed SSA form, call rewrite_into_loop_closed_ssa instead of update_ssa. * Makefile.in (tree-ssa.o): Depend on $(CFGLOOP_H). * gcc.dg/pr48739-1.c: New test. * gcc.dg/pr48739-2.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177924 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree-ssa.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'gcc/tree-ssa.c') diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c index 980716944ff..7564a52fabf 100644 --- a/gcc/tree-ssa.c +++ b/gcc/tree-ssa.c @@ -43,6 +43,7 @@ along with GCC; see the file COPYING3. If not see #include "tree-dump.h" #include "tree-pass.h" #include "diagnostic-core.h" +#include "cfgloop.h" /* Pointer map of variable mappings, keyed by edge. */ static struct pointer_map_t *edge_var_maps; @@ -2208,7 +2209,10 @@ execute_update_addresses_taken (void) } /* Update SSA form here, we are called as non-pass as well. */ - update_ssa (TODO_update_ssa); + if (number_of_loops () > 1 && loops_state_satisfies_p (LOOP_CLOSED_SSA)) + rewrite_into_loop_closed_ssa (NULL, TODO_update_ssa); + else + update_ssa (TODO_update_ssa); } BITMAP_FREE (not_reg_needs); -- cgit v1.2.1