From 97511ad77a76c86c46483a61eb5b8d1d208689af Mon Sep 17 00:00:00 2001 From: Revital Eres Date: Sun, 9 Sep 2007 09:25:32 +0000 Subject: Use new debug counter From-SVN: r128292 --- gcc/ChangeLog | 9 +++++++++ gcc/Makefile.in | 2 +- gcc/dbgcnt.def | 1 + gcc/modulo-sched.c | 6 +++--- gcc/params.def | 5 ----- 5 files changed, 14 insertions(+), 9 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 03aa380..e950e64 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2007-09-09 Revital Eres + + * dbgcnt.def (sms_sched_loop): New counter. + * modulo-sched.c: Use sms_sched_loop instead of + MAX_SMS_LOOP_NUMBER to determine the maximum number of loops to + perform swing modulo scheduling on. Include dbgcnt.h. + * Makefile.in: Add DBGCNT_H to modulo-sched.o. + * params.def: Remove PARAM_MAX_SMS_LOOP_NUMBER. + 2007-09-09 Uros Bizjak * config/i386/i386.md (X87MODEF12, SSEMODEF): Remove mode iterators. diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 348dbc4..273dda5 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -2765,7 +2765,7 @@ modulo-sched.o : modulo-sched.c $(DDG_H) $(CONFIG_H) $(CONFIG_H) $(SYSTEM_H) \ $(FLAGS_H) insn-config.h $(INSN_ATTR_H) except.h $(RECOG_H) \ $(SCHED_INT_H) $(CFGLAYOUT_H) $(CFGLOOP_H) $(EXPR_H) $(PARAMS_H) \ cfghooks.h $(GCOV_IO_H) hard-reg-set.h $(TM_H) timevar.h tree-pass.h \ - $(DF_H) + $(DF_H) $(DBGCNT_H) haifa-sched.o : haifa-sched.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ $(SCHED_INT_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h $(FUNCTION_H) \ $(INSN_ATTR_H) toplev.h $(RECOG_H) except.h $(TM_P_H) $(TARGET_H) output.h \ diff --git a/gcc/dbgcnt.def b/gcc/dbgcnt.def index a65ae67..18ef8a7 100644 --- a/gcc/dbgcnt.def +++ b/gcc/dbgcnt.def @@ -83,3 +83,4 @@ DEBUG_COUNTER (split_for_sched2) DEBUG_COUNTER (tail_call) DEBUG_COUNTER (global_alloc_at_func) DEBUG_COUNTER (global_alloc_at_reg) +DEBUG_COUNTER (sms_sched_loop) diff --git a/gcc/modulo-sched.c b/gcc/modulo-sched.c index 37c9204..075fe2e 100644 --- a/gcc/modulo-sched.c +++ b/gcc/modulo-sched.c @@ -47,6 +47,7 @@ along with GCC; see the file COPYING3. If not see #include "ddg.h" #include "timevar.h" #include "tree-pass.h" +#include "dbgcnt.h" #ifdef INSN_SCHEDULING @@ -862,7 +863,6 @@ canon_loop (struct loop *loop) static void sms_schedule (void) { - static int passes = 0; rtx insn; ddg_ptr *g_arr, g; int * node_order; @@ -919,10 +919,10 @@ sms_schedule (void) rtx count_reg; /* For debugging. */ - if ((passes++ > MAX_SMS_LOOP_NUMBER) && (MAX_SMS_LOOP_NUMBER != -1)) + if (dbg_cnt (sms_sched_loop) == false) { if (dump_file) - fprintf (dump_file, "SMS reached MAX_PASSES... \n"); + fprintf (dump_file, "SMS reached max limit... \n"); break; } diff --git a/gcc/params.def b/gcc/params.def index bcdb4bb..fcc1689 100644 --- a/gcc/params.def +++ b/gcc/params.def @@ -311,11 +311,6 @@ DEFPARAM(PARAM_MAX_ITERATIONS_COMPUTATION_COST, "Bound on the cost of an expression to compute the number of iterations", 10, 0, 0) -DEFPARAM(PARAM_MAX_SMS_LOOP_NUMBER, - "max-sms-loop-number", - "Maximum number of loops to perform swing modulo scheduling on (mainly for debugging)", - -1, -1, -1) - /* This parameter is used to tune SMS MAX II calculations. */ DEFPARAM(PARAM_SMS_MAX_II_FACTOR, "sms-max-ii-factor", -- cgit v1.1