From 7aeb92b4724c0dc16c5322241f8309ddfa3da89f Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Mon, 18 May 2015 11:05:15 +0200 Subject: [PATCH] IPA ICF: add support for debug counter. * dbgcnt.def: Add new counter. * ipa-icf.c (sem_item_optimizer::merge_classes): Use the counter. From-SVN: r223288 --- gcc/ChangeLog | 6 ++++++ gcc/ipa-icf.c | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 549fdacaeb1..bebe44c5257 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-05-18 Martin Liska + + * dbgcnt.def: Add new counter. + * ipa-icf.c (sem_item_optimizer::merge_classes): Use the + counter. + 2015-05-18 Martin Liska * dbgcnt.def: Sort counters. diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf.c index 3c4ac05681b..e7a317ab79d 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.30.2