diff options
author | Kazu Hirata <kazu@gcc.gnu.org> | 2007-01-02 18:06:37 +0000 |
---|---|---|
committer | Kazu Hirata <kazu@gcc.gnu.org> | 2007-01-02 18:06:37 +0000 |
commit | 61465e7563e79c8ce885f11f98b3ab639ddb0700 (patch) | |
tree | 855a61405368a6c9dd7ac4aa327081a187763a99 /gcc/regclass.c | |
parent | fbc8d2d30e4c1987e85e2d3fda043f2ae24c7ad1 (diff) | |
download | gcc-61465e7563e79c8ce885f11f98b3ab639ddb0700.zip gcc-61465e7563e79c8ce885f11f98b3ab639ddb0700.tar.gz gcc-61465e7563e79c8ce885f11f98b3ab639ddb0700.tar.bz2 |
Revert:
2007-01-02 Kazu Hirata <kazu@codesourcery.com>
* 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: r120351
Diffstat (limited to 'gcc/regclass.c')
-rw-r--r-- | gcc/regclass.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/gcc/regclass.c b/gcc/regclass.c index 7726ea1..8a0bab1 100644 --- a/gcc/regclass.c +++ b/gcc/regclass.c @@ -2177,8 +2177,9 @@ allocate_reg_info (size_t num_regs, int new_p, int renumber_p) if (!reg_n_info) { reg_n_info = VEC_alloc (reg_info_p, heap, regno_allocated); - VEC_safe_grow_cleared (reg_info_p, heap, reg_n_info, - regno_allocated); + VEC_safe_grow (reg_info_p, heap, reg_n_info, regno_allocated); + memset (VEC_address (reg_info_p, reg_n_info), 0, + sizeof (reg_info_p) * regno_allocated); renumber = xmalloc (size_renumber); reg_pref_buffer = XNEWVEC (struct reg_pref, regno_allocated); } @@ -2187,8 +2188,11 @@ allocate_reg_info (size_t num_regs, int new_p, int renumber_p) size_t old_length = VEC_length (reg_info_p, reg_n_info); if (old_length < regno_allocated) { - VEC_safe_grow_cleared (reg_info_p, heap, reg_n_info, - regno_allocated); + reg_info_p *addr; + VEC_safe_grow (reg_info_p, heap, reg_n_info, regno_allocated); + addr = VEC_address (reg_info_p, reg_n_info); + memset (&addr[old_length], 0, + sizeof (reg_info_p) * (regno_allocated - old_length)); } else if (regno_allocated < old_length) { |