Patchwork [17/65] Add more debug counter guards.

login
register
mail settings
Submitter Sebastian Pop
Date Aug. 2, 2010, 8:19 p.m.
Message ID <1280780438-17543-18-git-send-email-sebpop@gmail.com>
Download mbox | patch
Permalink /patch/60615/
State New
Headers show

Comments

Sebastian Pop - Aug. 2, 2010, 8:19 p.m.
From: spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>

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

	* graphite.c (graphite_transform_loops): Add two more dbg_cnt calls.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/graphite@161290 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/ChangeLog          |   11 +++++++++++
 gcc/ChangeLog.graphite |    4 ++++
 gcc/Makefile.in        |    2 +-
 gcc/dbgcnt.def         |    1 +
 gcc/graphite.c         |   17 +++++++++++------
 5 files changed, 28 insertions(+), 7 deletions(-)

Patch

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f08de60..9980de1 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,16 @@ 
 2010-08-02  Sebastian Pop  <sebastian.pop@amd.com>
 
+	* graphite.c (graphite_transform_loops): Add two more dbg_cnt calls.
+
+2010-08-02  Alexander Monakov  <amonakov@ispras.ru>
+
+	* dbgcnt.def (graphite_scop): New counter.
+	* graphite.c: Include dbgcnt.h.
+	(graphite_transform_loops): Use new counter to limit transformations.
+	* Makefile.in (graphite.o): Depend on DBGCNT_H.
+
+2010-08-02  Sebastian Pop  <sebastian.pop@amd.com>
+
 	* passes.c (init_optimization_passes): Add pass_graphite.
 	Schedule a pass_copy_prop before pass_graphite_transforms.
 	* timevar.def (TV_GRAPHITE): Declared.
diff --git a/gcc/ChangeLog.graphite b/gcc/ChangeLog.graphite
index 8b72f3e..166d9f3 100644
--- a/gcc/ChangeLog.graphite
+++ b/gcc/ChangeLog.graphite
@@ -1,3 +1,7 @@ 
+2010-06-23  Sebastian Pop  <sebastian.pop@amd.com>
+
+	* graphite.c (graphite_transform_loops): Add two more dbg_cnt calls.
+
 2010-06-15  Sebastian Pop  <sebastian.pop@amd.com>
 
 	* passes.c (init_optimization_passes): Add pass_graphite.
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index a6b3460..f10a9b0 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -2662,7 +2662,7 @@  sese.o: sese.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
    pointer-set.h $(GIMPLE_H) sese.h tree-pretty-print.h
 graphite.o: graphite.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
    $(GGC_H) $(TREE_H) $(RTL_H) $(BASIC_BLOCK_H) $(DIAGNOSTIC_H) $(TOPLEV_H) $(DIAGNOSTIC_CORE_H) \
-   $(TREE_FLOW_H) $(TREE_DUMP_H) $(TIMEVAR_H) $(CFGLOOP_H) $(GIMPLE_H) \
+   $(TREE_FLOW_H) $(TREE_DUMP_H) $(TIMEVAR_H) $(CFGLOOP_H) $(GIMPLE_H) $(DBGCNT_H) \
    $(PREDICT_H) $(TREE_DATA_REF_H) tree-pass.h graphite.h \
    pointer-set.h value-prof.h graphite-ppl.h sese.h \
    graphite-scop-detection.h graphite-clast-to-gimple.h \
diff --git a/gcc/dbgcnt.def b/gcc/dbgcnt.def
index ba7ce1f..0492d66 100644
--- a/gcc/dbgcnt.def
+++ b/gcc/dbgcnt.def
@@ -157,6 +157,7 @@  DEBUG_COUNTER (dse2)
 DEBUG_COUNTER (gcse2_delete)
 DEBUG_COUNTER (global_alloc_at_func)
 DEBUG_COUNTER (global_alloc_at_reg)
+DEBUG_COUNTER (graphite_scop)
 DEBUG_COUNTER (hoist)
 DEBUG_COUNTER (hoist_insn)
 DEBUG_COUNTER (ia64_sched2)
diff --git a/gcc/graphite.c b/gcc/graphite.c
index c4fd2a3..5b3b6aa 100644
--- a/gcc/graphite.c
+++ b/gcc/graphite.c
@@ -55,6 +55,7 @@  along with GCC; see the file COPYING3.  If not see
 #include "gimple.h"
 #include "sese.h"
 #include "predict.h"
+#include "dbgcnt.h"
 
 #ifdef HAVE_cloog
 
@@ -271,18 +272,22 @@  graphite_transform_loops (void)
   sbitmap_zero (reductions);
 
   for (i = 0; VEC_iterate (scop_p, scops, i, scop); i++)
-    rewrite_commutative_reductions_out_of_ssa (SCOP_REGION (scop), reductions);
+    if (dbg_cnt (graphite_scop))
+      rewrite_commutative_reductions_out_of_ssa (SCOP_REGION (scop),
+						 reductions);
 
   for (i = 0; VEC_iterate (scop_p, scops, i, scop); i++)
-    {
-      rewrite_reductions_out_of_ssa (scop);
-      build_scop_bbs (scop, reductions);
-    }
+    if (dbg_cnt (graphite_scop))
+      {
+	rewrite_reductions_out_of_ssa (scop);
+	build_scop_bbs (scop, reductions);
+      }
 
   sbitmap_free (reductions);
 
   for (i = 0; VEC_iterate (scop_p, scops, i, scop); i++)
-    build_poly_scop (scop);
+    if (dbg_cnt (graphite_scop))
+      build_poly_scop (scop);
 
   for (i = 0; VEC_iterate (scop_p, scops, i, scop); i++)
     if (POLY_SCOP_P (scop)