summaryrefslogtreecommitdiff
path: root/gcc/df-core.c
diff options
context:
space:
mode:
authorsteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>2013-03-23 21:40:20 +0000
committersteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>2013-03-23 21:40:20 +0000
commit690973a8398e9e305bd43ea322c4911c6b0d291e (patch)
treea239bd380b042d9cb7f211fb26c77c14065c461f /gcc/df-core.c
parentf032090774ddbdb37b097ab00c200e1d2df718f7 (diff)
downloadgcc-690973a8398e9e305bd43ea322c4911c6b0d291e.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@197011 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/df-core.c')
-rw-r--r--gcc/df-core.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/gcc/df-core.c b/gcc/df-core.c
index e3a5524c3d4..d392cd6867e 100644
--- a/gcc/df-core.c
+++ b/gcc/df-core.c
@@ -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++)