This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [graphite] Backend fixes


>  * graphite.c (graphite_transform_loops): Always call gloog and
>  find_transform.

I propose to commit the attached patch when the testsuite will pass
correctly with it: for the moment it shows

FAIL: gcc.dg/graphite/block-1.c (internal compiler error)
FAIL: gcc.dg/graphite/block-1.c (test for excess errors)
FAIL: gcc.dg/graphite/block-1.c scan-tree-dump-times graphite "Loop blocked" 3
FAIL: gcc.dg/graphite/scop-16.c (internal compiler error)
FAIL: gcc.dg/graphite/scop-16.c (test for excess errors)
FAIL: gcc.dg/graphite/scop-17.c (internal compiler error)
FAIL: gcc.dg/graphite/scop-17.c (test for excess errors)
FAIL: gcc.dg/graphite/scop-18.c (internal compiler error)
FAIL: gcc.dg/graphite/scop-18.c (test for excess errors)
FAIL: gcc.dg/graphite/scop-2.c (internal compiler error)
FAIL: gcc.dg/graphite/scop-2.c (test for excess errors)
FAIL: gcc.dg/graphite/scop-2.c scan-tree-dump-times graphite "number
of SCoPs: 4" 1
FAIL: gcc.dg/graphite/scop-7.c (internal compiler error)
FAIL: gcc.dg/graphite/scop-7.c (test for excess errors)
FAIL: gcc.dg/graphite/scop-7.c scan-tree-dump-times graphite "number
of SCoPs: 3" 1

FAIL: gfortran.dg/graphite/block-1.f90  -O  (internal compiler error)
FAIL: gfortran.dg/graphite/block-1.f90  -O  (test for excess errors)
FAIL: gfortran.dg/graphite/block-1.f90  -O  scan-tree-dump-times
graphite "Loop blocked" 2
got a INT signal, interrupted by user

last one hangs.
Index: graphite.c
===================================================================
--- graphite.c	(revision 139564)
+++ graphite.c	(working copy)
@@ -4392,6 +4392,7 @@ static bool
 graphite_apply_transformations (scop_p scop)
 {
   bool transform_done = false;
+
   /* Sort the list of bbs.  Keep them always sorted.  */
   graphite_sort_gbbs (scop);
   scop_remove_ignoreable_gbbs (scop);
@@ -4399,10 +4400,21 @@ graphite_apply_transformations (scop_p s
   if (flag_loop_block)
     transform_done = graphite_trans_scop_block (scop);
 
+#ifdef ENABLE_CHECKING
+  /* When the compiler is configured with ENABLE_CHECKING, always
+     generate code, even if we did not apply any transformation.  This
+     provides better code coverage of the backend code generator.
+
+     This also allows to check the performance for an identity
+     transform: GIMPLE -> GRAPHITE -> GIMPLE; and the output of CLooG
+     is never an identity: if CLooG optimizations are not disabled,
+     the CLooG output is always optimized in control flow.  */
+  transform_done = true;
+#endif
+
   return transform_done;
 }
 
-
 /* We limit all SCoPs to SCoPs, that are completely surrounded by a loop. 
 
    Example:
@@ -4503,16 +4515,8 @@ graphite_transform_loops (void)
 	  fprintf (dump_file, "\nnumber of data refs: %d\n", nbrefs);
 	}
 
-      /* We only build new graphite code, if we applied a transformation. But
-         call find_transform always to get more test coverage during
-         developement.  */
       if (graphite_apply_transformations (scop))
         gloog (scop, find_transform (scop));
-      else
-        {
-          struct clast_stmt* stmt = find_transform (scop);
-          cloog_clast_free (stmt);
-        }
     }
 
   if (dump_file && (dump_flags & TDF_DETAILS))
Index: ChangeLog.graphite
===================================================================
--- ChangeLog.graphite	(revision 139564)
+++ ChangeLog.graphite	(working copy)
@@ -1,4 +1,10 @@
 2008-08-25  Tobias Grosser  <grosser@fim.uni-passau.de>
+	    Sebastian Pop  <sebastian.pop@amd.com>
+
+	* graphite.c (graphite_transform_loops): Always enable gloog
+	and find_transform when ENABLE_CHECKING.
+
+2008-08-25  Tobias Grosser  <grosser@fim.uni-passau.de>
 
 	* graphite.c (gloog): Update dominator info.
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]