+2011-08-20 Jakub Jelinek <jakub@redhat.com>
+
+ 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).
+
2011-08-19 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/49936
$(TREE_DUMP_H) langhooks.h $(TREE_PASS_H) $(BASIC_BLOCK_H) $(BITMAP_H) \
$(FLAGS_H) $(GGC_H) $(HASHTAB_H) pointer-set.h \
$(GIMPLE_H) $(TREE_INLINE_H) $(TARGET_H) tree-pretty-print.h \
- gimple-pretty-print.h
+ gimple-pretty-print.h $(CFGLOOP_H)
tree-into-ssa.o : tree-into-ssa.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(TREE_H) $(TM_P_H) $(EXPR_H) output.h $(DIAGNOSTIC_H) \
$(FUNCTION_H) $(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \
+2011-08-20 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/48739
+ * gcc.dg/pr48739-1.c: New test.
+ * gcc.dg/pr48739-2.c: New test.
+
2011-08-20 Tobias Burnus <burnus@net-b.de>
* gfortran.dg/graphite/interchange-1.f: Remove xfail.
--- /dev/null
+/* PR tree-optimization/48739 */
+/* { dg-do compile } */
+/* { dg-require-effective-target pthread } */
+/* { dg-options "-O1 -ftree-parallelize-loops=2 -fno-tree-dominator-opts" } */
+
+extern int g;
+extern void bar (void);
+
+int
+foo (int x)
+{
+ int a, b, *c = (int *) 0;
+ for (a = 0; a < 10; ++a)
+ {
+ bar ();
+ for (b = 0; b < 5; ++b)
+ {
+ x = 0;
+ c = &x;
+ g = 1;
+ }
+ }
+ *c = x;
+ for (x = 0; x != 10; x++)
+ ;
+ return g;
+}
--- /dev/null
+/* PR tree-optimization/48739 */
+/* { dg-do compile } */
+/* { dg-require-effective-target pthread } */
+/* { dg-options "-O1 -ftree-parallelize-loops=2 -fno-tree-dominator-opts" } */
+
+extern int g, v[10];
+extern void bar (void);
+
+int
+foo (int x)
+{
+ int a, b, *c = (int *) 0;
+ for (a = 0; a < 10; ++a)
+ {
+ bar ();
+ for (b = 0; b < 5; ++b)
+ {
+ x = 0;
+ c = &x;
+ g = 1;
+ }
+ }
+ *c = x;
+ for (x = 0; x != 10; x++)
+ v[x] = x;
+ return g;
+}
#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;
}
/* 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);