df-core.c (rest_of_handle_df_initialize): Use XCNEWVEC instead of XNEWVEC followed by memset.

* df-core.c (rest_of_handle_df_initialize): Use XCNEWVEC instead
	of XNEWVEC followed by memset.
	(df_worklist_dataflow): Use XNEWVEC instead of xmalloc with a cast.

From-SVN: r197011
This commit is contained in:
Steven Bosscher 2013-03-23 21:40:20 +00:00
parent 17a02b0648
commit 225ccc68d7
2 changed files with 8 additions and 5 deletions

View File

@ -1,3 +1,9 @@
2013-03-23 Steven Bosscher <steven@gcc.gnu.org>
* df-core.c (rest_of_handle_df_initialize): Use XCNEWVEC instead
of XNEWVEC followed by memset.
(df_worklist_dataflow): Use XNEWVEC instead of xmalloc with a cast.
2013-03-23 Steven Bosscher <steven@gcc.gnu.org>
* config/avr/avr.c, config/bfin/bfin.c, config/c6x/c6x.c,

View File

@ -727,9 +727,7 @@ rest_of_handle_df_initialize (void)
df->n_blocks_inverted = inverted_post_order_compute (df->postorder_inverted);
gcc_assert (df->n_blocks == df->n_blocks_inverted);
df->hard_regs_live_count = XNEWVEC (unsigned int, FIRST_PSEUDO_REGISTER);
memset (df->hard_regs_live_count, 0,
sizeof (unsigned int) * FIRST_PSEUDO_REGISTER);
df->hard_regs_live_count = XCNEWVEC (unsigned int, FIRST_PSEUDO_REGISTER);
df_hard_reg_init ();
/* After reload, some ports add certain bits to regs_ever_live so
@ -1074,8 +1072,7 @@ df_worklist_dataflow (struct dataflow *dataflow,
gcc_assert (dir != DF_NONE);
/* BBINDEX_TO_POSTORDER maps the bb->index to the reverse postorder. */
bbindex_to_postorder =
(unsigned int *)xmalloc (last_basic_block * sizeof (unsigned int));
bbindex_to_postorder = XNEWVEC (unsigned int, last_basic_block);
/* Initialize the array to an out-of-bound value. */
for (i = 0; i < last_basic_block; i++)