public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/kubaneko/heads/histogram)] removed wild fprint removed redundant struct fields
@ 2022-10-23 21:54 Ondrej Kubanek
0 siblings, 0 replies; 3+ messages in thread
From: Ondrej Kubanek @ 2022-10-23 21:54 UTC (permalink / raw)
To: gcc-cvs
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. */
^ permalink raw reply [flat|nested] 3+ messages in thread
* [gcc(refs/users/kubaneko/heads/histogram)] removed wild fprint removed redundant struct fields
@ 2023-02-16 16:27 Ondrej Kubanek
0 siblings, 0 replies; 3+ messages in thread
From: Ondrej Kubanek @ 2023-02-16 16:27 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:e42112badf6a42e36cfd4634bfe1590e6206c38c
commit e42112badf6a42e36cfd4634bfe1590e6206c38c
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. */
^ permalink raw reply [flat|nested] 3+ messages in thread
* [gcc(refs/users/kubaneko/heads/histogram)] removed wild fprint removed redundant struct fields
@ 2023-02-23 23:21 Ondrej Kubanek
0 siblings, 0 replies; 3+ messages in thread
From: Ondrej Kubanek @ 2023-02-23 23:21 UTC (permalink / raw)
To: gcc-cvs
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. */
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-02-23 23:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-23 21:54 [gcc(refs/users/kubaneko/heads/histogram)] removed wild fprint removed redundant struct fields Ondrej Kubanek
2023-02-16 16:27 Ondrej Kubanek
2023-02-23 23:21 Ondrej Kubanek
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).