add recursion on the inner loops
authorSebastian Pop <s.pop@samsung.com>
Thu, 1 Oct 2015 15:17:51 +0000 (15:17 +0000)
committerSebastian Pop <spop@gcc.gnu.org>
Thu, 1 Oct 2015 15:17:51 +0000 (15:17 +0000)
We now check that all data references in the current loop and inner loops
contained within loop are valid in an outer region before declaring that the
outer loop is a valid scop.

2015-09-30  Sebastian Pop  <s.pop@samsung.com>
    Aditya Kumar  <aditya.k7@samsung.com>

PR tree-optimization/67754
* graphite-scop-detection.c (loop_body_is_valid_scop): Add missing
recursion on the inner loops.

Co-Authored-By: Aditya Kumar <aditya.k7@samsung.com>
From-SVN: r228346

gcc/ChangeLog
gcc/graphite-scop-detection.c

index c0f2d0f8ec7f372ea7de9ee72f11e0bb6d9e19b5..00d4cea9fce9eb84295f003c8c72c3b9129a6dde 100644 (file)
@@ -1,3 +1,10 @@
+2015-10-01  Sebastian Pop  <s.pop@samsung.com>
+           Aditya Kumar  <aditya.k7@samsung.com>
+
+       PR tree-optimization/67754
+       * graphite-scop-detection.c (loop_body_is_valid_scop): Add missing
+       recursion on the inner loops.
+
 2015-10-01  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
 
        * cfganal.c, compare-elim.c, coverage.c, cprop.c, df-scan.c,
index a498ddcdbfc1dfb7b0ececb1386712ed6299ff95..d95f527c61907277d87305f283a6d7abbe4a4bfd 100644 (file)
@@ -805,6 +805,18 @@ loop_body_is_valid_scop (loop_p loop, sese_l scop)
        return false;
     }
   free (bbs);
+
+  if (loop->inner)
+    {
+      loop = loop->inner;
+      while (loop)
+       {
+         if (!loop_body_is_valid_scop (loop, scop))
+           return false;
+         loop = loop->next;
+       }
+    }
+
   return true;
 }