public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 1/2] add recursion on the inner loops
@ 2015-09-30 23:58 Sebastian Pop
       [not found] ` <1443651097-407-2-git-send-email-s.pop@samsung.com>
  0 siblings, 1 reply; 2+ messages in thread
From: Sebastian Pop @ 2015-09-30 23:58 UTC (permalink / raw)
  To: gcc-patches; +Cc: sebpop, aditya.k7, tobias, richard.guenther, Sebastian Pop

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 2/2] call scev analysis in scop-detection as in sese-to-poly
       [not found] ` <1443651097-407-2-git-send-email-s.pop@samsung.com>
@ 2015-10-01  8:00   ` Tobias Grosser
  0 siblings, 0 replies; 2+ messages in thread
From: Tobias Grosser @ 2015-10-01  8:00 UTC (permalink / raw)
  To: Sebastian Pop, gcc-patches; +Cc: sebpop, aditya.k7, richard.guenther

On 10/01/2015 12:11 AM, Sebastian Pop wrote:
> Before our rewrite of the scop detection, we used to not have a valid SESE
> region under hand, and so we used to do more ad-hoc analysis of data references
> by trying to prove that at all levels of a loop nest the data references would
> be still valid.
>
> Now that we have a valid SESE region, we can call the scev analysis in the same
> way on the same computed loop nest in the scop-detection as in the sese-to-poly.
>
> Next step will be to cache the data references analyzed in the scop detection
> and not compute the same info in sese-to-poly.
>
> The patch fixes block-1.f90 that used to ICE on x86_64-linux when compiled with
> -m32.  Patch passed bootstrap with BOOT_CFLAGS="-g -O2 -fgraphite-identity
> -floop-nest-optimize" and check on x86_64-linux using ISL-0.15.

Nice.

Tobias

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-10-01  8:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-30 23:58 [PATCH 1/2] add recursion on the inner loops Sebastian Pop
     [not found] ` <1443651097-407-2-git-send-email-s.pop@samsung.com>
2015-10-01  8:00   ` [PATCH 2/2] call scev analysis in scop-detection as in sese-to-poly Tobias Grosser

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).