From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7880) id 94425385700C; Sun, 23 Oct 2022 21:54:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 94425385700C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1666562098; bh=LWUy6YMAv7pfOYVsyb/P9ODeLL3W1UnU2Yv2gqbhj9A=; h=From:To:Subject:Date:From; b=N3v+ZIX440GxcsLOhLkpCmgL5kPoD2SGQU9l8PFuxEbE++XqFaAQUIkfC41Anb2Fi 6NMTHkvodX7ch40Gyt7nZoht0fY8ZqXLYa7E6YcCd0/mN6kw9jvZ+hNcvskR5FB9Cn loGIvxdOXIPbP3PcTj2bVAdFXIXPeCbxmrGDIB+E= 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: 1c52150cb1c65d7b9c91fdaa8d3b5876a10cd58f X-Git-Newrev: 1cfbfa54233de23c87bfa0d9cd1228a00958566c Message-Id: <20221023215458.94425385700C@sourceware.org> Date: Sun, 23 Oct 2022 21:54:57 +0000 (GMT) List-Id: https://gcc.gnu.org/g:1cfbfa54233de23c87bfa0d9cd1228a00958566c commit 1cfbfa54233de23c87bfa0d9cd1228a00958566c 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 062eeb5cc52..a33d59177d0 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 e11042f3ada..02e292722fd 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; } @@ -1542,12 +1534,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 b600bdc694a..1ca2524e862 100644 --- a/gcc/value-prof.cc +++ b/gcc/value-prof.cc @@ -120,7 +120,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 ae61f7f7fe2..8719b65df7c 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. */