diff mbox

[1/2] dbgcnt: enhance behavior.

Message ID fdc9f84c889a8fe4ed17e5df124741432a59368b.1431688088.git.mliska@suse.cz
State New
Headers show

Commit Message

Martin Liška May 15, 2015, 10:36 a.m. UTC
Hi.

Following patch changes GCC so that it exits after -fdbg-cnt-list and counters
are sorted in dbgcnt.def file.

Ready for trunk?
Thanks,
Martin

gcc/ChangeLog:

2015-05-15  Martin Liska  <mliska@suse.cz>

	* dbgcnt.def: Sort counters.
	* opts.c (common_handle_option): Do not compile if
	-fdbg-cnt-list is enabled.
---
 gcc/dbgcnt.def | 27 ++++++++++++++-------------
 gcc/opts.c     |  4 ++++
 2 files changed, 18 insertions(+), 13 deletions(-)

Comments

Jeff Law May 15, 2015, 7:48 p.m. UTC | #1
On 05/15/2015 04:36 AM, mliska wrote:
> Hi.
>
> Following patch changes GCC so that it exits after -fdbg-cnt-list and counters
> are sorted in dbgcnt.def file.
>
> Ready for trunk?
> Thanks,
> Martin
>
> gcc/ChangeLog:
>
> 2015-05-15  Martin Liska  <mliska@suse.cz>
>
> 	* dbgcnt.def: Sort counters.
> 	* opts.c (common_handle_option): Do not compile if
> 	-fdbg-cnt-list is enabled.
OK.  We're obviously assuming that nobody cares about the change in 
behaviour for -fdbg-cnt-list :-)


jeff
diff mbox

Patch

diff --git a/gcc/dbgcnt.def b/gcc/dbgcnt.def
index 4b26e77..95f6b06 100644
--- a/gcc/dbgcnt.def
+++ b/gcc/dbgcnt.def
@@ -144,8 +144,8 @@  echo ubound: $ub
 DEBUG_COUNTER (auto_inc_dec)
 DEBUG_COUNTER (ccp)
 DEBUG_COUNTER (cfg_cleanup)
-DEBUG_COUNTER (cse2_move2add)
 DEBUG_COUNTER (cprop)
+DEBUG_COUNTER (cse2_move2add)
 DEBUG_COUNTER (dce)
 DEBUG_COUNTER (dce_fast)
 DEBUG_COUNTER (dce_ud)
@@ -155,6 +155,7 @@  DEBUG_COUNTER (df_byte_scan)
 DEBUG_COUNTER (dse)
 DEBUG_COUNTER (dse1)
 DEBUG_COUNTER (dse2)
+DEBUG_COUNTER (eipa_sra)
 DEBUG_COUNTER (gcse2_delete)
 DEBUG_COUNTER (global_alloc_at_func)
 DEBUG_COUNTER (global_alloc_at_reg)
@@ -162,31 +163,31 @@  DEBUG_COUNTER (graphite_scop)
 DEBUG_COUNTER (hoist)
 DEBUG_COUNTER (hoist_insn)
 DEBUG_COUNTER (ia64_sched2)
-DEBUG_COUNTER (if_conversion)
-DEBUG_COUNTER (if_conversion_tree)
 DEBUG_COUNTER (if_after_combine)
 DEBUG_COUNTER (if_after_reload)
+DEBUG_COUNTER (if_conversion)
+DEBUG_COUNTER (if_conversion_tree)
+DEBUG_COUNTER (ira_move)
 DEBUG_COUNTER (local_alloc_for_sched)
+DEBUG_COUNTER (merged_ipa_icf)
 DEBUG_COUNTER (postreload_cse)
 DEBUG_COUNTER (pre)
 DEBUG_COUNTER (pre_insn)
-DEBUG_COUNTER (treepre_insert)
-DEBUG_COUNTER (tree_sra)
-DEBUG_COUNTER (eipa_sra)
-DEBUG_COUNTER (vect_loop)
-DEBUG_COUNTER (vect_slp)
+DEBUG_COUNTER (registered_jump_thread)
 DEBUG_COUNTER (sched2_func)
 DEBUG_COUNTER (sched_block)
+DEBUG_COUNTER (sched_breakdep)
 DEBUG_COUNTER (sched_func)
 DEBUG_COUNTER (sched_insn)
-DEBUG_COUNTER (sched_breakdep)
 DEBUG_COUNTER (sched_region)
 DEBUG_COUNTER (sel_sched_cnt)
-DEBUG_COUNTER (sel_sched_region_cnt)
 DEBUG_COUNTER (sel_sched_insn_cnt)
+DEBUG_COUNTER (sel_sched_region_cnt)
 DEBUG_COUNTER (sms_sched_loop)
-DEBUG_COUNTER (store_motion)
 DEBUG_COUNTER (split_for_sched2)
+DEBUG_COUNTER (store_motion)
 DEBUG_COUNTER (tail_call)
-DEBUG_COUNTER (ira_move)
-DEBUG_COUNTER (registered_jump_thread)
+DEBUG_COUNTER (treepre_insert)
+DEBUG_COUNTER (tree_sra)
+DEBUG_COUNTER (vect_loop)
+DEBUG_COUNTER (vect_slp)
diff --git a/gcc/opts.c b/gcc/opts.c
index fed5d12..a5461c5 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -1757,8 +1757,12 @@  common_handle_option (struct gcc_options *opts,
       break;
 
     case OPT_fdbg_cnt_:
+      /* Deferred.  */
+      break;
+
     case OPT_fdbg_cnt_list:
       /* Deferred.  */
+      opts->x_exit_after_options = true;
       break;
 
     case OPT_fdebug_prefix_map_: