From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7880) id 2D2B0385B50C; Thu, 23 Feb 2023 23:21:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2D2B0385B50C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677194507; bh=OXWPadfgG/61Y0aEEzZI4Fqi4/6ymcHyF1EPYjsytls=; h=From:To:Subject:Date:From; b=OS0HBTHBHHZdP+1XymufE8++cFumdH2IGggcqttZsLCBO2bI9keekjhS94dAqAHxA ggCfrRIed6/u4Fgba34pfkpwh9k/S4aQiYPXdf3qK7NO3ClRVT5EU4MDk1xaTLTExK dEuDcc62CANzfivZV5SFZGejmMDLbutEpOUOX4hk= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Ondrej Kubanek To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/kubaneko/heads/histogram)] removed wild fprint removed redundant struct fields X-Act-Checkin: gcc X-Git-Author: kubaneko X-Git-Refname: refs/users/kubaneko/heads/histogram X-Git-Oldrev: e44325a383dd859323ab8dd9fad15ecfa80a1264 X-Git-Newrev: b4bad988926bdc89042cc9448e604558f556f7cf Message-Id: <20230223232147.2D2B0385B50C@sourceware.org> Date: Thu, 23 Feb 2023 23:21:47 +0000 (GMT) List-Id: https://gcc.gnu.org/g:b4bad988926bdc89042cc9448e604558f556f7cf commit b4bad988926bdc89042cc9448e604558f556f7cf Author: kubaneko Date: Sun Oct 23 21:54:39 2022 +0000 removed wild fprint removed redundant struct fields Diff: --- gcc/cfgloop.h | 2 -- gcc/profile.cc | 20 +++----------------- gcc/value-prof.cc | 1 - gcc/value-prof.h | 1 - 4 files changed, 3 insertions(+), 21 deletions(-) diff --git a/gcc/cfgloop.h b/gcc/cfgloop.h index ea49a8e891a..63c75e8a0de 100644 --- a/gcc/cfgloop.h +++ b/gcc/cfgloop.h @@ -275,8 +275,6 @@ public: reused. */ basic_block former_header; - bool valid_hist = false; - // We store histogram values here gcov_type hist[69]; }; diff --git a/gcc/profile.cc b/gcc/profile.cc index ae20af9619e..1ffc3e35210 100644 --- a/gcc/profile.cc +++ b/gcc/profile.cc @@ -928,17 +928,9 @@ compute_value_histograms (histogram_values values, unsigned cfg_checksum, { auto lp = hist->hvalue.lp; if (act_count[t]){ - if (lp->valid_hist) - { - for (int i=0;i<69;++i){ - lp->hist[i]+=act_count[t][i]; - } - } else { - lp->valid_hist = true; - for (int i=0;i<69;++i){ - lp->hist[i]=act_count[t][i]; - } - } + for (int i=0;i<69;++i){ + lp->hist[i]=act_count[t][i]; + } } continue; } @@ -1544,12 +1536,6 @@ branch_prob (bool thunk) compute_value_histograms (values, cfg_checksum, lineno_checksum); } - for (auto loop : loops_list (cfun, 0)){ - if (loop->valid_hist){ - printf("%ld %ld %ld %ld", loop->hist[0], loop->hist[1], loop->hist[2], loop->hist[3]); - } - } - remove_fake_edges (); /* For each edge not on the spanning tree, add counting code. */ diff --git a/gcc/value-prof.cc b/gcc/value-prof.cc index 3d7a2a370f1..d81b210b068 100644 --- a/gcc/value-prof.cc +++ b/gcc/value-prof.cc @@ -119,7 +119,6 @@ gimple_alloc_histogram_value (struct function *fun ATTRIBUTE_UNUSED, histogram_value hist = (histogram_value) xcalloc (1, sizeof (*hist)); hist->hvalue.value = value; hist->hvalue.stmt = stmt; - hist->hvalue.edge = NULL; hist->hvalue.lp = NULL; hist->type = type; return hist; diff --git a/gcc/value-prof.h b/gcc/value-prof.h index 6c9385fe53c..5ea3dc69716 100644 --- a/gcc/value-prof.h +++ b/gcc/value-prof.h @@ -49,7 +49,6 @@ struct histogram_value_t { tree value; /* The value to profile. */ gimple *stmt; /* Insn containing the value. */ - edge_def *edge; /* For adding to empty bbs */ class loop *lp; gcov_type *counters; /* Pointer to first counter. */ struct histogram_value_t *next; /* Linked list pointer. */