From cf72400ff386816898a63d44045e3b2d18847872 Mon Sep 17 00:00:00 2001 From: Sebastian Pop Date: Thu, 1 Oct 2015 15:17:51 +0000 Subject: add recursion on the inner loops 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 Aditya Kumar 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 From-SVN: r228346 --- gcc/graphite-scop-detection.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'gcc/graphite-scop-detection.c') 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; } -- cgit v1.1