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: Sun, 23 Oct 2022 21:54:57 +0000 (GMT)	[thread overview]
Message-ID: <20221023215458.94425385700C@sourceware.org> (raw)

https://gcc.gnu.org/g:1cfbfa54233de23c87bfa0d9cd1228a00958566c

commit 1cfbfa54233de23c87bfa0d9cd1228a00958566c
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 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.  */

             reply	other threads:[~2022-10-23 21:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-23 21:54 Ondrej Kubanek [this message]
2023-02-16 16:27 Ondrej Kubanek
2023-02-23 23:21 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=20221023215458.94425385700C@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: link
Be 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).