Patchwork [27/28] Only copy PBB_DOMAIN when it is initialized.

login
register
mail settings
Submitter Sebastian Pop
Date Jan. 21, 2011, 7:27 p.m.
Message ID <1295638067-13460-28-git-send-email-sebpop@gmail.com>
Download mbox | patch
Permalink /patch/79910/
State New
Headers show

Comments

Sebastian Pop - Jan. 21, 2011, 7:27 p.m.
From: spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>

2011-01-19  Sebastian Pop  <sebastian.pop@amd.com>

	* graphite-sese-to-poly.c (new_pbb_from_pbb): Only copy PBB_DOMAIN
	when it is initialized.

	* gfortran.dg/graphite/id-23.f: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/graphite@169046 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/ChangeLog                              |    5 +++++
 gcc/ChangeLog.graphite                     |    7 +++++++
 gcc/graphite-sese-to-poly.c                |    6 ++++--
 gcc/testsuite/ChangeLog                    |    4 ++++
 gcc/testsuite/gfortran.dg/graphite/id-23.f |   13 +++++++++++++
 5 files changed, 33 insertions(+), 2 deletions(-)
 create mode 100644 gcc/testsuite/gfortran.dg/graphite/id-23.f

Patch

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 29eb4c5..0e2164b 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,10 @@ 
 2011-01-21  Sebastian Pop  <sebastian.pop@amd.com>
 
+	* graphite-sese-to-poly.c (new_pbb_from_pbb): Only copy PBB_DOMAIN
+	when it is initialized.
+
+2011-01-21  Sebastian Pop  <sebastian.pop@amd.com>
+
 	* graphite-scop-detection.c (stmt_has_simple_data_refs_p): Update
 	call to graphite_find_data_references_in_stmt.
 	* graphite-sese-to-poly.c (outermost_loop_in_sese_1): New.
diff --git a/gcc/ChangeLog.graphite b/gcc/ChangeLog.graphite
index 12524d4..8855606 100644
--- a/gcc/ChangeLog.graphite
+++ b/gcc/ChangeLog.graphite
@@ -1,5 +1,12 @@ 
 2011-01-19  Sebastian Pop  <sebastian.pop@amd.com>
 
+	* graphite-sese-to-poly.c (new_pbb_from_pbb): Only copy PBB_DOMAIN
+	when it is initialized.
+
+	* gfortran.dg/graphite/id-23.f: New.
+
+2011-01-19  Sebastian Pop  <sebastian.pop@amd.com>
+
 	* graphite-scop-detection.c (stmt_has_simple_data_refs_p): Update
 	call to graphite_find_data_references_in_stmt.
 	* graphite-sese-to-poly.c (outermost_loop_in_sese_1): New.
diff --git a/gcc/graphite-sese-to-poly.c b/gcc/graphite-sese-to-poly.c
index 88536fe..c6b4385 100644
--- a/gcc/graphite-sese-to-poly.c
+++ b/gcc/graphite-sese-to-poly.c
@@ -2152,9 +2152,11 @@  new_pbb_from_pbb (scop_p scop, poly_bb_p pbb, basic_block bb)
     if (VEC_index (poly_bb_p, SCOP_BBS (scop), index) == pbb)
       break;
 
+  if (PBB_DOMAIN (pbb))
+    ppl_new_Pointset_Powerset_C_Polyhedron_from_Pointset_Powerset_C_Polyhedron
+      (&PBB_DOMAIN (pbb1), PBB_DOMAIN (pbb));
+
   GBB_PBB (gbb1) = pbb1;
-  ppl_new_Pointset_Powerset_C_Polyhedron_from_Pointset_Powerset_C_Polyhedron
-    (&PBB_DOMAIN (pbb1), PBB_DOMAIN (pbb));
   GBB_CONDITIONS (gbb1) = VEC_copy (gimple, heap, GBB_CONDITIONS (gbb));
   GBB_CONDITION_CASES (gbb1) = VEC_copy (gimple, heap, GBB_CONDITION_CASES (gbb));
   VEC_safe_insert (poly_bb_p, heap, SCOP_BBS (scop), index + 1, pbb1);
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 864bd89..209eeda 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,9 @@ 
 2011-01-21  Sebastian Pop  <sebastian.pop@amd.com>
 
+	* gfortran.dg/graphite/id-23.f: New.
+
+2011-01-21  Sebastian Pop  <sebastian.pop@amd.com>
+
 	* gfortran.dg/graphite/interchange-3.f90: Un-XFAILed.
 
 2011-01-21  Sebastian Pop  <sebastian.pop@amd.com>
diff --git a/gcc/testsuite/gfortran.dg/graphite/id-23.f b/gcc/testsuite/gfortran.dg/graphite/id-23.f
new file mode 100644
index 0000000..74c2928
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/graphite/id-23.f
@@ -0,0 +1,13 @@ 
+      SUBROUTINE CAMB(RX2,RTX,NUM)
+      DIMENSION RX2(NUM,NUM),RTX(NUM,NUM)
+      DO I=1,NUM
+        DO J=1,I
+          DO M=1,NUM
+            RX2(I,J)=RX2(I,J)+RTX(M,I)
+          END DO
+        END DO
+      END DO
+      IF (RX2(I,1).LE.EIGCT2) THEN
+      RTX(I,1)=4.0D+00
+      END IF
+      END