Patchwork [32/44] Fix lst_update_scattering.

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

Comments

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

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

	* graphite-poly.h (lst_update_scattering_seq): Removed.
	(lst_update_scattering): Correctly handle outermost loop dewey
	renumbering.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/graphite@164125 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/ChangeLog          |    6 ++++++
 gcc/ChangeLog.graphite |    6 ++++++
 gcc/graphite-poly.h    |   36 ++++++++++++++----------------------
 3 files changed, 26 insertions(+), 22 deletions(-)

Patch

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7f09a83..1e7141d 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,11 @@ 
 2010-09-30  Sebastian Pop  <sebastian.pop@amd.com>
 
+	* graphite-poly.h (lst_update_scattering_seq): Removed.
+	(lst_update_scattering): Correctly handle outermost loop dewey
+	renumbering.
+
+2010-09-30  Sebastian Pop  <sebastian.pop@amd.com>
+
 	* graphite-blocking.c (pbb_strip_mine_profitable_p): Renamed
 	lst_strip_mine_profitable_p.  Call lst_niter_for_loop.
 	* graphite-poly.h (lst_niter_for_loop): New.
diff --git a/gcc/ChangeLog.graphite b/gcc/ChangeLog.graphite
index a22f77e..f085803 100644
--- a/gcc/ChangeLog.graphite
+++ b/gcc/ChangeLog.graphite
@@ -1,5 +1,11 @@ 
 2010-09-09  Sebastian Pop  <sebastian.pop@amd.com>
 
+	* graphite-poly.h (lst_update_scattering_seq): Removed.
+	(lst_update_scattering): Correctly handle outermost loop dewey
+	renumbering.
+
+2010-09-09  Sebastian Pop  <sebastian.pop@amd.com>
+
 	* graphite-blocking.c (pbb_strip_mine_profitable_p): Renamed
 	lst_strip_mine_profitable_p.  Call lst_niter_for_loop.
 	* graphite-poly.h (lst_niter_for_loop): New.
diff --git a/gcc/graphite-poly.h b/gcc/graphite-poly.h
index 5f536a8..e93c2ad 100644
--- a/gcc/graphite-poly.h
+++ b/gcc/graphite-poly.h
@@ -1120,24 +1120,6 @@  lst_update_scattering_under (lst_p lst, int level, int dewey)
     pbb_update_scattering (LST_PBB (lst), level, dewey);
 }
 
-/* Updates the scattering of all the PBBs under LST and in sequence
-   with LST.  */
-
-static inline void
-lst_update_scattering_seq (lst_p lst)
-{
-  int i;
-  lst_p l;
-  lst_p father = LST_LOOP_FATHER (lst);
-  int dewey = lst_dewey_number (lst);
-  int level = lst_depth (lst);
-
-  gcc_assert (lst && father && dewey >= 0 && level >= 0);
-
-  for (i = dewey; VEC_iterate (lst_p, LST_SEQ (father), i, l); i++)
-    lst_update_scattering_under (l, level, i);
-}
-
 /* Updates the all the scattering levels of all the PBBs under
    LST.  */
 
@@ -1147,14 +1129,24 @@  lst_update_scattering (lst_p lst)
   int i;
   lst_p l;
 
-  if (!lst || !LST_LOOP_P (lst))
+  if (!lst)
     return;
 
   if (LST_LOOP_FATHER (lst))
-    lst_update_scattering_seq (lst);
+    {
+      lst_p father = LST_LOOP_FATHER (lst);
+      int dewey = lst_dewey_number (lst);
+      int level = lst_depth (lst);
 
-  for (i = 0; VEC_iterate (lst_p, LST_SEQ (lst), i, l); i++)
-    lst_update_scattering (l);
+      gcc_assert (lst && father && dewey >= 0 && level >= 0);
+
+      for (i = dewey; VEC_iterate (lst_p, LST_SEQ (father), i, l); i++)
+	lst_update_scattering_under (l, level, i);
+    }
+
+  if (LST_LOOP_P (lst))
+    for (i = 0; VEC_iterate (lst_p, LST_SEQ (lst), i, l); i++)
+      lst_update_scattering (l);
 }
 
 /* Inserts LST1 before LST2 if BEFORE is true; inserts LST1 after LST2