public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 1/2] dbgcnt: enhance behavior.
@ 2015-05-15 11:09 mliska
  2015-05-15 11:48 ` [PATCH 2/2] IPA ICF: add support for debug counter mliska
  2015-05-15 19:48 ` [PATCH 1/2] dbgcnt: enhance behavior Jeff Law
  0 siblings, 2 replies; 4+ messages in thread
From: mliska @ 2015-05-15 11:09 UTC (permalink / raw)
  To: gcc-patches

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(-)

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_:
-- 
2.1.4


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 2/2] IPA ICF: add support for debug counter.
  2015-05-15 11:09 [PATCH 1/2] dbgcnt: enhance behavior mliska
@ 2015-05-15 11:48 ` mliska
  2015-05-15 19:48   ` Jeff Law
  2015-05-15 19:48 ` [PATCH 1/2] dbgcnt: enhance behavior Jeff Law
  1 sibling, 1 reply; 4+ messages in thread
From: mliska @ 2015-05-15 11:48 UTC (permalink / raw)
  To: gcc-patches

Hi.

Following patch add support of dbg-cnt for IPA ICF pass.

Ready for trunk?
Thanks,
Martin

gcc/ChangeLog:

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

	* dbgcnt.def: Add new counter.
	* ipa-icf.c (sem_item_optimizer::merge_classes): Use the
	counter.
---
 gcc/dbgcnt.def | 1 +
 gcc/ipa-icf.c  | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/gcc/dbgcnt.def b/gcc/dbgcnt.def
index 95f6b06..24bf24b 100644
--- a/gcc/dbgcnt.def
+++ b/gcc/dbgcnt.def
@@ -168,6 +168,7 @@ DEBUG_COUNTER (if_after_reload)
 DEBUG_COUNTER (if_conversion)
 DEBUG_COUNTER (if_conversion_tree)
 DEBUG_COUNTER (ira_move)
+DEBUG_COUNTER (merged_ipa_icf)
 DEBUG_COUNTER (local_alloc_for_sched)
 DEBUG_COUNTER (merged_ipa_icf)
 DEBUG_COUNTER (postreload_cse)
diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf.c
index 1fbdf6d..1237157 100644
--- a/gcc/ipa-icf.c
+++ b/gcc/ipa-icf.c
@@ -123,6 +123,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "ipa-icf-gimple.h"
 #include "ipa-icf.h"
 #include "stor-layout.h"
+#include "dbgcnt.h"
 
 using namespace ipa_icf_gimple;
 
@@ -3453,7 +3454,8 @@ sem_item_optimizer::merge_classes (unsigned int prev_class_count)
 		alias->dump_to_file (dump_file);
 	      }
 
-	    merged_p |= source->merge (alias);
+	    if (dbg_cnt (merged_ipa_icf))
+	      merged_p |= source->merge (alias);
 	  }
       }
 
-- 
2.1.4

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] dbgcnt: enhance behavior.
  2015-05-15 11:09 [PATCH 1/2] dbgcnt: enhance behavior mliska
  2015-05-15 11:48 ` [PATCH 2/2] IPA ICF: add support for debug counter mliska
@ 2015-05-15 19:48 ` Jeff Law
  1 sibling, 0 replies; 4+ messages in thread
From: Jeff Law @ 2015-05-15 19:48 UTC (permalink / raw)
  To: mliska, gcc-patches

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] IPA ICF: add support for debug counter.
  2015-05-15 11:48 ` [PATCH 2/2] IPA ICF: add support for debug counter mliska
@ 2015-05-15 19:48   ` Jeff Law
  0 siblings, 0 replies; 4+ messages in thread
From: Jeff Law @ 2015-05-15 19:48 UTC (permalink / raw)
  To: mliska, gcc-patches

On 05/15/2015 03:03 AM, mliska wrote:
> Hi.
>
> Following patch add support of dbg-cnt for IPA ICF pass.
>
> Ready for trunk?
> Thanks,
> Martin
>
> gcc/ChangeLog:
>
> 2015-05-15  Martin Liska  <mliska@suse.cz>
>
> 	* dbgcnt.def: Add new counter.
> 	* ipa-icf.c (sem_item_optimizer::merge_classes): Use the
> 	counter.
OK.
jeff

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-05-15 19:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-15 11:09 [PATCH 1/2] dbgcnt: enhance behavior mliska
2015-05-15 11:48 ` [PATCH 2/2] IPA ICF: add support for debug counter mliska
2015-05-15 19:48   ` Jeff Law
2015-05-15 19:48 ` [PATCH 1/2] dbgcnt: enhance behavior Jeff Law

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).