The following enables another 35% more loop nest optimizations on
SPEC CPU 2006.

Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk.

Richard.

2017-09-18  Richard Biener  <rguent...@suse.de>

        * graphite-scop-detection.c (scop_detection::can_represent_loop):
        Do not iterate to sibling loops but only to siblings of inner
        loops.

Index: gcc/graphite-scop-detection.c
===================================================================
--- gcc/graphite-scop-detection.c       (revision 252923)
+++ gcc/graphite-scop-detection.c       (working copy)
@@ -975,11 +975,9 @@ scop_detection::can_represent_loop (loop
 {
   if (!can_represent_loop_1 (loop, scop))
     return false;
-  if (loop->inner && !can_represent_loop (loop->inner, scop))
-    return false;
-  if (loop->next && !can_represent_loop (loop->next, scop))
-    return false;
-
+  for (loop_p inner = loop->inner; inner; inner = inner->next)
+    if (!can_represent_loop (inner, scop))
+      return false;
   return true;
 }
 

Reply via email to