aboutsummaryrefslogtreecommitdiff
path: root/gcc/reg-stack.c
diff options
context:
space:
mode:
authorKazu Hirata <kazu@codesourcery.com>2007-01-02 17:03:22 +0000
committerKazu Hirata <kazu@gcc.gnu.org>2007-01-02 17:03:22 +0000
commitd887a68299b172a03c4648b16fdfbef9dcf25ce0 (patch)
tree1f25b7cb7537dc60cde280443031fd6d10f7a458 /gcc/reg-stack.c
parentf1441c81b036c3fd8ec8effc6035d8458e187f38 (diff)
downloadgcc-d887a68299b172a03c4648b16fdfbef9dcf25ce0.zip
gcc-d887a68299b172a03c4648b16fdfbef9dcf25ce0.tar.gz
gcc-d887a68299b172a03c4648b16fdfbef9dcf25ce0.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: r120345
Diffstat (limited to 'gcc/reg-stack.c')
-rw-r--r--gcc/reg-stack.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/gcc/reg-stack.c b/gcc/reg-stack.c
index 49c733e..793c6b5 100644
--- a/gcc/reg-stack.c
+++ b/gcc/reg-stack.c
@@ -315,16 +315,10 @@ stack_regs_mentioned (rtx insn)
max = VEC_length (char, stack_regs_mentioned_data);
if (uid >= max)
{
- char *p;
- unsigned int old_max = max;
-
/* Allocate some extra size to avoid too many reallocs, but
do not grow too quickly. */
max = uid + uid / 20 + 1;
- VEC_safe_grow (char, heap, stack_regs_mentioned_data, max);
- p = VEC_address (char, stack_regs_mentioned_data);
- memset (&p[old_max], 0,
- sizeof (char) * (max - old_max));
+ VEC_safe_grow_cleared (char, heap, stack_regs_mentioned_data, max);
}
test = VEC_index (char, stack_regs_mentioned_data, uid);