This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH 1/2] add recursion on the inner loops
- From: Sebastian Pop <s dot pop at samsung dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: sebpop at gmail dot com, aditya dot k7 at samsung dot com, tobias at grosser dot es, richard dot guenther at gmail dot com, Sebastian Pop <s dot pop at samsung dot com>
- Date: Wed, 30 Sep 2015 17:11:36 -0500
- Subject: [PATCH 1/2] add recursion on the inner loops
- Authentication-results: sourceware.org; auth=none
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.
---
gcc/graphite-scop-detection.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/gcc/graphite-scop-detection.c b/gcc/graphite-scop-detection.c
index a498ddc..d95f527 100644
--- a/gcc/graphite-scop-detection.c
+++ b/gcc/graphite-scop-detection.c
@@ -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;
}
--
2.1.0.243.g30d45f7