public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/kubaneko/heads/histogram)] vector for histogram_counters not working yet
@ 2023-02-16 16:28 Ondrej Kubanek
0 siblings, 0 replies; 3+ messages in thread
From: Ondrej Kubanek @ 2023-02-16 16:28 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:668f791ed080ec29bb28c00ebbeaf32ca0258abe
commit 668f791ed080ec29bb28c00ebbeaf32ca0258abe
Author: kubaneko <kubanek0ondrej@gmail.com>
Date: Mon Jan 2 14:54:29 2023 +0000
vector for histogram_counters not working yet
Diff:
---
gcc/cfgloop.h | 2 +-
gcc/profile.cc | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/gcc/cfgloop.h b/gcc/cfgloop.h
index 6f09698bc3c..f2b54fcad99 100644
--- a/gcc/cfgloop.h
+++ b/gcc/cfgloop.h
@@ -97,7 +97,7 @@ struct loop_exit_hasher : ggc_ptr_hash<loop_exit>
struct GTY(()) histogram_counters{
gcov_type sum;
int histogram_size;
- gcov_type hist[69];
+ vec<gcov_type, va_gc> *hist=NULL;
};
// quantil function for the distribution
diff --git a/gcc/profile.cc b/gcc/profile.cc
index 7282d97ad01..c754432f19b 100644
--- a/gcc/profile.cc
+++ b/gcc/profile.cc
@@ -931,10 +931,12 @@ compute_value_histograms (histogram_values values, unsigned cfg_checksum,
lp->counters=ggc_alloc<histogram_counters>();
gcov_type sum=0;
for (int i=0;i<param_profile_histogram_size;++i){
- lp->counters->hist[i]=act_count[t][i];
+ auto hst=lp->counters->hist;
+ (*hst)[i]=act_count[t][i];
sum+=act_count[t][i];
}
lp->counters->sum=sum;
+ vec_safe_grow_cleared(lp->counters->hist,param_profile_histogram_size);
}
continue;
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* [gcc(refs/users/kubaneko/heads/histogram)] vector for histogram_counters not working yet
@ 2023-02-23 23:22 Ondrej Kubanek
0 siblings, 0 replies; 3+ messages in thread
From: Ondrej Kubanek @ 2023-02-23 23:22 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:680d2bf08fa12f99cfcdfd946b95465061cd13a8
commit 680d2bf08fa12f99cfcdfd946b95465061cd13a8
Author: kubaneko <kubanek0ondrej@gmail.com>
Date: Mon Jan 2 14:54:29 2023 +0000
vector for histogram_counters not working yet
Diff:
---
gcc/cfgloop.h | 2 +-
gcc/profile.cc | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/gcc/cfgloop.h b/gcc/cfgloop.h
index 8ec6bb03ad1..c0604ff2ffc 100644
--- a/gcc/cfgloop.h
+++ b/gcc/cfgloop.h
@@ -97,7 +97,7 @@ struct loop_exit_hasher : ggc_ptr_hash<loop_exit>
struct GTY(()) histogram_counters{
gcov_type sum;
int histogram_size;
- gcov_type hist[69];
+ vec<gcov_type, va_gc> *hist=NULL;
};
// quantil function for the distribution
diff --git a/gcc/profile.cc b/gcc/profile.cc
index 5a6cedfaaec..f4dfe575c61 100644
--- a/gcc/profile.cc
+++ b/gcc/profile.cc
@@ -931,10 +931,12 @@ compute_value_histograms (histogram_values values, unsigned cfg_checksum,
lp->counters=ggc_alloc<histogram_counters>();
gcov_type sum=0;
for (int i=0;i<param_profile_histogram_size;++i){
- lp->counters->hist[i]=act_count[t][i];
+ auto hst=lp->counters->hist;
+ (*hst)[i]=act_count[t][i];
sum+=act_count[t][i];
}
lp->counters->sum=sum;
+ vec_safe_grow_cleared(lp->counters->hist,param_profile_histogram_size);
}
continue;
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* [gcc(refs/users/kubaneko/heads/histogram)] vector for histogram_counters not working yet
@ 2023-01-02 14:59 Ondrej Kubanek
0 siblings, 0 replies; 3+ messages in thread
From: Ondrej Kubanek @ 2023-01-02 14:59 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:0906263537f9a7c8cb224c04b0337ffc7c7951fa
commit 0906263537f9a7c8cb224c04b0337ffc7c7951fa
Author: kubaneko <kubanek0ondrej@gmail.com>
Date: Mon Jan 2 14:54:29 2023 +0000
vector for histogram_counters not working yet
Diff:
---
gcc/cfgloop.h | 2 +-
gcc/profile.cc | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/gcc/cfgloop.h b/gcc/cfgloop.h
index 6f09698bc3c..f2b54fcad99 100644
--- a/gcc/cfgloop.h
+++ b/gcc/cfgloop.h
@@ -97,7 +97,7 @@ struct loop_exit_hasher : ggc_ptr_hash<loop_exit>
struct GTY(()) histogram_counters{
gcov_type sum;
int histogram_size;
- gcov_type hist[69];
+ vec<gcov_type, va_gc> *hist=NULL;
};
// quantil function for the distribution
diff --git a/gcc/profile.cc b/gcc/profile.cc
index 7282d97ad01..c754432f19b 100644
--- a/gcc/profile.cc
+++ b/gcc/profile.cc
@@ -931,10 +931,12 @@ compute_value_histograms (histogram_values values, unsigned cfg_checksum,
lp->counters=ggc_alloc<histogram_counters>();
gcov_type sum=0;
for (int i=0;i<param_profile_histogram_size;++i){
- lp->counters->hist[i]=act_count[t][i];
+ auto hst=lp->counters->hist;
+ (*hst)[i]=act_count[t][i];
sum+=act_count[t][i];
}
lp->counters->sum=sum;
+ vec_safe_grow_cleared(lp->counters->hist,param_profile_histogram_size);
}
continue;
}
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-02-23 23:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-16 16:28 [gcc(refs/users/kubaneko/heads/histogram)] vector for histogram_counters not working yet Ondrej Kubanek
-- strict thread matches above, loose matches on Subject: below --
2023-02-23 23:22 Ondrej Kubanek
2023-01-02 14:59 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).