Patchwork [24/44] Speed-up loop blocking: strip-mining is always legal.

login
register
mail settings
Submitter Sebastian Pop
Date Sept. 30, 2010, 6:01 p.m.
Message ID <1285869696-10915-25-git-send-email-sebpop@gmail.com>
Download mbox | patch
Permalink /patch/66212/
State New
Headers show

Comments

Sebastian Pop - Sept. 30, 2010, 6:01 p.m.
From: spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>

2010-08-23  Sebastian Pop  <sebastian.pop@amd.com>

	* graphite-blocking.c (scop_do_strip_mine): Do not call
	graphite_legal_transform.
	(scop_do_block): Same.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/graphite@163486 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/ChangeLog           |    6 ++++++
 gcc/ChangeLog.graphite  |    6 ++++++
 gcc/graphite-blocking.c |   29 +++++++----------------------
 3 files changed, 19 insertions(+), 22 deletions(-)

Patch

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 494a384..89d76f4 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@ 
+2010-09-30  Sebastian Pop  <sebastian.pop@amd.com>
+
+	* graphite-blocking.c (scop_do_strip_mine): Do not call
+	graphite_legal_transform.
+	(scop_do_block): Same.
+
 2010-09-30  Vladimir Kargov  <kargov@gmail.com>
 
 	* graphite-scop-detection.c (graphite_can_represent_loop): Correct the
diff --git a/gcc/ChangeLog.graphite b/gcc/ChangeLog.graphite
index 4337d88..f94fc6e 100644
--- a/gcc/ChangeLog.graphite
+++ b/gcc/ChangeLog.graphite
@@ -1,3 +1,9 @@ 
+2010-08-23  Sebastian Pop  <sebastian.pop@amd.com>
+
+	* graphite-blocking.c (scop_do_strip_mine): Do not call
+	graphite_legal_transform.
+	(scop_do_block): Same.
+
 2010-08-20  Vladimir Kargov  <kargov@gmail.com>
 
 	* graphite-scop-detection.c (graphite_can_represent_loop): Correct the
diff --git a/gcc/graphite-blocking.c b/gcc/graphite-blocking.c
index 5108ed0..6e4334a 100644
--- a/gcc/graphite-blocking.c
+++ b/gcc/graphite-blocking.c
@@ -254,28 +254,13 @@  lst_do_strip_mine (lst_p lst)
   return res;
 }
 
-/* Strip mines all the loops in SCOP.  Nothing profitable in all this:
-   this is just a driver function.  */
+/* Strip mines all the loops in SCOP.  Returns true when some loops
+   have been strip-mined.  */
 
 bool
 scop_do_strip_mine (scop_p scop)
 {
-  bool transform_done = false;
-
-  store_scattering (scop);
-
-  transform_done = lst_do_strip_mine (SCOP_TRANSFORMED_SCHEDULE (scop));
-
-  if (!transform_done)
-    return false;
-
-  if (!graphite_legal_transform (scop))
-    {
-      restore_scattering (scop);
-      return false;
-    }
-
-  return transform_done;
+  return lst_do_strip_mine (SCOP_TRANSFORMED_SCHEDULE (scop));
 }
 
 /* Loop blocks all the loops in SCOP.  Returns true when we manage to
@@ -292,10 +277,10 @@  scop_do_block (scop_p scop)
   strip_mined = lst_do_strip_mine (SCOP_TRANSFORMED_SCHEDULE (scop));
   interchanged = scop_do_interchange (scop);
 
-  /* If we don't interchange loops, then the strip mine is not
-     profitable, and the transform is not a loop blocking.  */
-  if (!interchanged
-      || !graphite_legal_transform (scop))
+  /* If we don't interchange loops, the strip mine alone will not be
+     profitable, and the transform is not a loop blocking: so revert
+     the transform.  */
+  if (!interchanged)
     {
       restore_scattering (scop);
       return false;