public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/kubaneko/heads/histogram)] fixed vector allocation
@ 2023-01-14 22:04 Ondrej Kubanek
0 siblings, 0 replies; 3+ messages in thread
From: Ondrej Kubanek @ 2023-01-14 22:04 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:d389e3e2bc71aea126b27eeaedc6b114d9222660
commit d389e3e2bc71aea126b27eeaedc6b114d9222660
Author: kubaneko <kubanek0ondrej@gmail.com>
Date: Sat Jan 14 22:04:29 2023 +0000
fixed vector allocation
Diff:
---
gcc/cfgloop.h | 2 +-
gcc/profile.cc | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/gcc/cfgloop.h b/gcc/cfgloop.h
index 7483417a304..f74d3275d87 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;
- vec<gcov_type, va_heap> * GTY((skip)) hist;
+ vec<gcov_type, va_heap, vl_embed> * GTY((skip)) hist;
};
// quantil function for the distribution
diff --git a/gcc/profile.cc b/gcc/profile.cc
index c754432f19b..5199dcec13a 100644
--- a/gcc/profile.cc
+++ b/gcc/profile.cc
@@ -930,13 +930,14 @@ compute_value_histograms (histogram_values values, unsigned cfg_checksum,
if (act_count[t]){
lp->counters=ggc_alloc<histogram_counters>();
gcov_type sum=0;
+ lp->counters->hist=NULL;
+ vec_safe_grow_cleared(lp->counters->hist,param_profile_histogram_size);
for (int i=0;i<param_profile_histogram_size;++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)] fixed vector allocation
@ 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:98d59dcdebb492055ca7d648abc475bfafdfd3e5
commit 98d59dcdebb492055ca7d648abc475bfafdfd3e5
Author: kubaneko <kubanek0ondrej@gmail.com>
Date: Sat Jan 14 22:04:29 2023 +0000
fixed vector allocation
Diff:
---
gcc/cfgloop.h | 2 +-
gcc/profile.cc | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/gcc/cfgloop.h b/gcc/cfgloop.h
index b6a005450a8..14945bc967d 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;
- vec<gcov_type, va_heap> * GTY((skip)) hist;
+ vec<gcov_type, va_heap, vl_embed> * GTY((skip)) hist;
};
// quantil function for the distribution
diff --git a/gcc/profile.cc b/gcc/profile.cc
index f4dfe575c61..dbe005a1d39 100644
--- a/gcc/profile.cc
+++ b/gcc/profile.cc
@@ -930,13 +930,14 @@ compute_value_histograms (histogram_values values, unsigned cfg_checksum,
if (act_count[t]){
lp->counters=ggc_alloc<histogram_counters>();
gcov_type sum=0;
+ lp->counters->hist=NULL;
+ vec_safe_grow_cleared(lp->counters->hist,param_profile_histogram_size);
for (int i=0;i<param_profile_histogram_size;++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)] fixed vector allocation
@ 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:18009000aa840b2c6d759334ab28a0e9fc07128d
commit 18009000aa840b2c6d759334ab28a0e9fc07128d
Author: kubaneko <kubanek0ondrej@gmail.com>
Date: Sat Jan 14 22:04:29 2023 +0000
fixed vector allocation
Diff:
---
gcc/cfgloop.h | 2 +-
gcc/profile.cc | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/gcc/cfgloop.h b/gcc/cfgloop.h
index 7483417a304..f74d3275d87 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;
- vec<gcov_type, va_heap> * GTY((skip)) hist;
+ vec<gcov_type, va_heap, vl_embed> * GTY((skip)) hist;
};
// quantil function for the distribution
diff --git a/gcc/profile.cc b/gcc/profile.cc
index c754432f19b..5199dcec13a 100644
--- a/gcc/profile.cc
+++ b/gcc/profile.cc
@@ -930,13 +930,14 @@ compute_value_histograms (histogram_values values, unsigned cfg_checksum,
if (act_count[t]){
lp->counters=ggc_alloc<histogram_counters>();
gcov_type sum=0;
+ lp->counters->hist=NULL;
+ vec_safe_grow_cleared(lp->counters->hist,param_profile_histogram_size);
for (int i=0;i<param_profile_histogram_size;++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-01-14 22:04 [gcc(refs/users/kubaneko/heads/histogram)] fixed vector allocation Ondrej Kubanek
2023-02-16 16:28 Ondrej Kubanek
2023-02-23 23:22 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).