IPA ICF: add support for debug counter.
authorMartin Liska <mliska@suse.cz>
Mon, 18 May 2015 09:05:15 +0000 (11:05 +0200)
committerMartin Liska <marxin@gcc.gnu.org>
Mon, 18 May 2015 09:05:15 +0000 (09:05 +0000)
* dbgcnt.def: Add new counter.
* ipa-icf.c (sem_item_optimizer::merge_classes): Use the
counter.

From-SVN: r223288

gcc/ChangeLog
gcc/ipa-icf.c

index 549fdacaeb1913fc8bfe6ee8710e5803fd6cccee..bebe44c5257bd7b85206a6489335ba3424fd5ba8 100644 (file)
@@ -1,3 +1,9 @@
+2015-05-18  Martin Liska  <mliska@suse.cz>
+
+       * dbgcnt.def: Add new counter.
+       * ipa-icf.c (sem_item_optimizer::merge_classes): Use the
+       counter.
+
 2015-05-18  Martin Liska  <mliska@suse.cz>
 
        * dbgcnt.def: Sort counters.
index 3c4ac05681bd90d58e1221424e911c1a167e1476..e7a317ab79db450d80b29ae925c9023dc54e263a 100644 (file)
@@ -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);
          }
       }