cfgrtl.c (rtl_create_basic_block): Pre-allocate basic_block_info array.

* cfgrtl.c (rtl_create_basic_block): Pre-allocate basic_block_info
	array.

From-SVN: r79585
This commit is contained in:
Jan Hubicka 2004-03-17 12:42:10 +01:00 committed by Jan Hubicka
parent 3a3ae5e5ed
commit 7eca076798
2 changed files with 11 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2004-03-17 Jan Hubicka <jh@suse.cz>
* cfgrtl.c (rtl_create_basic_block): Pre-allocate basic_block_info
array.
2004-03-17 James E Wilson <wilson@specifixinc.com>
* config/mips/mips.md (zero_extendsidi2): Add length attribute.

View File

@ -338,8 +338,12 @@ rtl_create_basic_block (void *headp, void *endp, basic_block after)
rtx head = headp, end = endp;
basic_block bb;
/* Place the new block just after the end. */
VARRAY_GROW (basic_block_info, last_basic_block + 1);
/* Grow the basic block array if needed. */
if ((size_t) last_basic_block >= VARRAY_SIZE (basic_block_info))
{
size_t new_size = last_basic_block + (last_basic_block + 3) / 4;
VARRAY_GROW (basic_block_info, new_size);
}
n_basic_blocks++;