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: [PATCH] Use a debug counter in SRA


On Thu, 10 Jun 2010, Martin Jambor wrote:

> Hi,
> 
> the patch below adds a debug counter check to the gate of the SRAs for
> better debugging and even bi-secting problems by users.
> 
> Bootstrapped and tested on x86_64-linux.  OK for trunk?

Ok.

Thanks,
Richard.

> Thanks,
> 
> Martin
> 
> 
> 2010-06-10  Martin Jambor  <mjambor@suse.cz>
> 
> 	* Makefile.in (tree-sra.o): Add DBGCNT_H to dependencies.
> 	* dbgcnt.def (tree_sra): New counter.
> 	* tree-sra.c: Include dbgcnt.h.
> 	(gate_intra_sra): Check tree_sra debug counter.
> 
> Index: mine/gcc/Makefile.in
> ===================================================================
> --- mine.orig/gcc/Makefile.in
> +++ mine/gcc/Makefile.in
> @@ -3112,7 +3112,7 @@ tree-ssa-ccp.o : tree-ssa-ccp.c $(TREE_F
>  tree-sra.o : tree-sra.c $(CONFIG_H) $(SYSTEM_H) coretypes.h alloc-pool.h \
>     $(TM_H) $(TREE_H) $(GIMPLE_H) $(CGRAPH_H) $(TREE_FLOW_H) $(IPA_PROP_H) \
>     $(DIAGNOSTIC_H) statistics.h $(TREE_DUMP_H) $(TIMEVAR_H) $(PARAMS_H) \
> -   $(TARGET_H) $(FLAGS_H) $(EXPR_H) tree-pretty-print.h
> +   $(TARGET_H) $(FLAGS_H) $(EXPR_H) tree-pretty-print.h $(DBGCNT_H)
>  tree-switch-conversion.o : tree-switch-conversion.c $(CONFIG_H) $(SYSTEM_H) \
>      $(TREE_H) $(TM_P_H) $(TREE_FLOW_H) $(DIAGNOSTIC_H) $(TREE_INLINE_H) \
>      $(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) $(GIMPLE_H) \
> Index: mine/gcc/dbgcnt.def
> ===================================================================
> --- mine.orig/gcc/dbgcnt.def
> +++ mine/gcc/dbgcnt.def
> @@ -167,6 +167,7 @@ DEBUG_COUNTER (postreload_cse)
>  DEBUG_COUNTER (pre)
>  DEBUG_COUNTER (pre_insn)
>  DEBUG_COUNTER (treepre_insert)
> +DEBUG_COUNTER (tree_sra)
>  DEBUG_COUNTER (sched2_func)
>  DEBUG_COUNTER (sched_block)
>  DEBUG_COUNTER (sched_func)
> Index: mine/gcc/tree-sra.c
> ===================================================================
> --- mine.orig/gcc/tree-sra.c
> +++ mine/gcc/tree-sra.c
> @@ -88,6 +88,7 @@ along with GCC; see the file COPYING3.
>  #include "params.h"
>  #include "target.h"
>  #include "flags.h"
> +#include "dbgcnt.h"
>  
>  /* Enumeration of all aggregate reductions we can do.  */
>  enum sra_mode { SRA_MODE_EARLY_IPA,   /* early call regularization */
> @@ -2936,7 +2937,7 @@ late_intra_sra (void)
>  static bool
>  gate_intra_sra (void)
>  {
> -  return flag_tree_sra != 0;
> +  return flag_tree_sra != 0 && dbg_cnt (tree_sra);
>  }
>  
>  
> 
> 

-- 
Richard Guenther <rguenther@suse.de>
Novell / SUSE Labs
SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746 - GF: Markus Rex


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