public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Ondrej Kubanek <kubaneko@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/kubaneko/heads/histogram)] removed wild fprint removed redundant struct fields Date: Thu, 23 Feb 2023 23:21:47 +0000 (GMT) [thread overview] Message-ID: <20230223232147.2D2B0385B50C@sourceware.org> (raw) https://gcc.gnu.org/g:b4bad988926bdc89042cc9448e604558f556f7cf commit b4bad988926bdc89042cc9448e604558f556f7cf Author: kubaneko <kubanek0ondrej@gmail.com> 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. */
next reply other threads:[~2023-02-23 23:21 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-02-23 23:21 Ondrej Kubanek [this message] -- strict thread matches above, loose matches on Subject: below -- 2023-02-16 16:27 Ondrej Kubanek 2022-10-23 21:54 Ondrej Kubanek
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20230223232147.2D2B0385B50C@sourceware.org \ --to=kubaneko@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).