diff options
author | Kazu Hirata <kazu@gcc.gnu.org> | 2007-01-03 08:04:01 +0000 |
---|---|---|
committer | Kazu Hirata <kazu@gcc.gnu.org> | 2007-01-03 08:04:01 +0000 |
commit | a590ac6560e0100d139c98367367bf7e0a467df5 (patch) | |
tree | aadfa1db2616271ff973c978a56b4690b7aefe12 /gcc/cfgrtl.c | |
parent | 7bda5cc2e632d9f1ab1379bb94fbb226d13afc55 (diff) | |
download | gcc-a590ac6560e0100d139c98367367bf7e0a467df5.zip gcc-a590ac6560e0100d139c98367367bf7e0a467df5.tar.gz gcc-a590ac6560e0100d139c98367367bf7e0a467df5.tar.bz2 |
alias.c (init_alias_analysis): Use VEC_safe_grow_cleared.
* alias.c (init_alias_analysis): Use VEC_safe_grow_cleared.
* cfgbuild.c (find_basic_blocks): Likewise.
* cfgrtl.c (rtl_create_basic_block): Likewise.
* function.c (temp_slots_at_level): Likewise.
* reg-stack.c (stack_regs_mentioned): Likewise.
* regclass.c (allocate_reg_info): Likewise.
* tree-cfg.c (init_empty_tree_cfg, build_tree_cfg, create_bb,
set_bb_for_stmt, move_block_to_fn): Likewise.
* tree-complex.c (tree_lower_complex): Likewise.
* vec.h (VEC_safe_grow_cleared): New.
From-SVN: r120386
Diffstat (limited to 'gcc/cfgrtl.c')
-rw-r--r-- | gcc/cfgrtl.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c index bb70bdf..c6cc08f 100644 --- a/gcc/cfgrtl.c +++ b/gcc/cfgrtl.c @@ -327,12 +327,8 @@ rtl_create_basic_block (void *headp, void *endp, basic_block after) /* Grow the basic block array if needed. */ if ((size_t) last_basic_block >= VEC_length (basic_block, basic_block_info)) { - size_t old_size = VEC_length (basic_block, basic_block_info); size_t new_size = last_basic_block + (last_basic_block + 3) / 4; - basic_block *p; - VEC_safe_grow (basic_block, gc, basic_block_info, new_size); - p = VEC_address (basic_block, basic_block_info); - memset (&p[old_size], 0, sizeof (basic_block) * (new_size - old_size)); + VEC_safe_grow_cleared (basic_block, gc, basic_block_info, new_size); } n_basic_blocks++; |