diff options
author | Jakub Jelinek <jakub@redhat.com> | 2023-09-29 09:35:01 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2023-09-29 09:35:01 +0200 |
commit | a561369743025fd64a3d87bc571d0503b17a82c8 (patch) | |
tree | 6fa616adce64711e201e4b5be34904c27df2202b /gcc/builtins.cc | |
parent | 14c363c13560fe7333fa487bff7dddcc07c5640b (diff) | |
download | gcc-a561369743025fd64a3d87bc571d0503b17a82c8.zip gcc-a561369743025fd64a3d87bc571d0503b17a82c8.tar.gz gcc-a561369743025fd64a3d87bc571d0503b17a82c8.tar.bz2 |
use *_grow_cleared rather than *_grow on vec<bitmap_head>
The assert checking which is commented out in vec.h grow method requires
trivially default constructible types to be used with this method, but
bitmap_head has since the PR88317 r9-4642 workaround non-trivial default
constructor to catch bugs and we pay the minimum price of initializing
everything in bitmap_head twice on the common
bitmap_head var;
bitmap_initilize (&var, obstack);
sequence. This patch makes us pay the same price times number of elements
on
vec<bitmap_head> v;
v.create (n);
v.safe_grow_cleared (n); // previous v.safe_grow (n);
for (int i = 0; i < n; ++i)
bitmap_initialize (&v[i], obstack);
2023-09-29 Jakub Jelinek <jakub@redhat.com>
* tree-ssa-loop-im.cc (tree_ssa_lim_initialize): Use quick_grow_cleared
instead of quick_grow on vec<bitmap_head> members.
* cfganal.cc (control_dependences::control_dependences): Likewise.
* rtl-ssa/blocks.cc (function_info::build_info::build_info): Likewise.
(function_info::place_phis): Use safe_grow_cleared instead of safe_grow
on auto_vec<bitmap_head> vars.
* tree-ssa-live.cc (compute_live_vars): Use quick_grow_cleared instead
of quick_grow on vec<bitmap_head> var.
Diffstat (limited to 'gcc/builtins.cc')
0 files changed, 0 insertions, 0 deletions