OSDN Git Service

2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
authorgrosser <grosser@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 23 Oct 2008 17:00:35 +0000 (17:00 +0000)
committergrosser <grosser@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 23 Oct 2008 17:00:35 +0000 (17:00 +0000)
* graphite.c (graphite_apply_transformations): Check for
-fgraphite-identity.
* toplev.c (process_options): Add graphite_identity.
* tree-ssa-loop.c (gate_graphite_transforms): Add graphite_identity.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@141325 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/common.opt
gcc/graphite.c
gcc/toplev.c
gcc/tree-ssa-loop.c

index bd8ba33..1ade1e7 100644 (file)
@@ -1,3 +1,10 @@
+2008-10-23  Tobias Grosser  <grosser@fim.uni-passau.de>
+
+       * graphite.c (graphite_apply_transformations): Check for
+       -fgraphite-identity.
+       * toplev.c (process_options): Add graphite_identity.
+       * tree-ssa-loop.c (gate_graphite_transforms): Add graphite_identity.
+
 2008-10-23  Bernd Schmidt  <bernd.schmidt@analog.com>
 
        * config/bfin/bfin.c (bdesc_2arg): Add mulhisill, mulhisilh,
index 6f09dfd..4e68067 100644 (file)
@@ -567,6 +567,10 @@ floop-block
 Common Report Var(flag_loop_block) Optimization
 Enable Loop Blocking transformation
 
+fgraphite-identity
+Common Report Var(flag_graphite_identity) Optimization
+Enable Graphite Identity transformation
+
 fguess-branch-probability
 Common Report Var(flag_guess_branch_prob) Optimization
 Enable guessing of branch probabilities
index 18174ee..a14dd14 100644 (file)
@@ -5068,17 +5068,13 @@ graphite_apply_transformations (scop_p scop)
   if (flag_loop_block)
     transform_done = graphite_trans_scop_block (scop);
 
-#if 0 && 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
+  /* Generate code even if we did not apply any real transformation.
+     This also allows to check the performance for the identity
+     transformation: GIMPLE -> GRAPHITE -> GIMPLE
+     Keep in mind that CLooG optimizes in control, so the loop structure
+     may change, even if we only use -fgraphite-identity.  */ 
+  if (flag_graphite_identity)
+    transform_done = true;
 
   return transform_done;
 }
index 24e4df7..42ad2a4 100644 (file)
@@ -1707,7 +1707,8 @@ process_options (void)
   if (flag_graphite
       || flag_loop_block
       || flag_loop_interchange
-      || flag_loop_strip_mine)
+      || flag_loop_strip_mine
+      || flag_graphite_identity)
     sorry ("Graphite loop optimizations cannot be used");
 #endif
 
index 51fc07c..2ea58f6 100644 (file)
@@ -305,7 +305,8 @@ gate_graphite_transforms (void)
 {
   /* Enable -fgraphite pass if any one of the graphite optimization flags 
      is turned on.  */
-  if (flag_loop_block || flag_loop_interchange || flag_loop_strip_mine)
+  if (flag_loop_block || flag_loop_interchange || flag_loop_strip_mine
+      || flag_graphite_identity)
     flag_graphite = 1;
 
   return flag_graphite != 0;