+2018-01-09 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/83572
+ * graphite.c: Include cfganal.h.
+ (graphite_transform_loops): Connect infinite loops to exit
+ and remove fake edges at the end.
+
2018-01-09 Jan Hubicka <hubicka@ucw.cz>
* ipa-inline.c (edge_badness): Revert accidental checkin.
#include "tree-pass.h"
#include "params.h"
#include "pretty-print.h"
+#include "cfganal.h"
#ifdef HAVE_isl
#include "cfghooks.h"
calculate_dominance_info (CDI_DOMINATORS);
+ /* We rely on post-dominators during merging of SESE regions so those
+ have to be meaningful. */
+ connect_infinite_loops_to_exit ();
+
ctx = isl_ctx_alloc ();
isl_options_set_on_error (ctx, ISL_ON_ERROR_ABORT);
the_isl_ctx = ctx;
build_scops (&scops);
free_dominance_info (CDI_POST_DOMINATORS);
+ /* Remove the fake exits before transform given they are not reflected
+ in loop structures we end up verifying. */
+ remove_fake_exit_edges ();
+
if (dump_file && (dump_flags & TDF_DETAILS))
{
print_graphite_statistics (dump_file, scops);
release_recorded_exits (cfun);
tree_estimate_probability (false);
}
-
}
#else /* If isl is not available: #ifndef HAVE_isl. */
+2018-01-09 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/83572
+ * gcc.dg/graphite/pr83572.c: New testcase.
+
2018-01-09 Jakub Jelinek <jakub@redhat.com>
PR target/83507
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O -floop-nest-optimize -fno-tree-loop-im" } */
+
+int u0, l1;
+
+void
+u3 (int s1)
+{
+ for (;;)
+ {
+ for (u0 = 0; u0 < 2; ++u0)
+ {
+ }
+
+ if (s1 != 0)
+ for (l1 = 0; l1 < 2; ++l1)
+ {
+ }
+
+ l1 = 0;
+ }
+}