public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [patch] minor, obvious cleanup in df-core.c
@ 2013-03-23 21:41 Steven Bosscher
  0 siblings, 0 replies; only message in thread
From: Steven Bosscher @ 2013-03-23 21:41 UTC (permalink / raw)
  To: GCC Patches

Committed as obvious.

       * 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.

Index: df-core.c
===================================================================
--- df-core.c   (revision 197010)
+++ df-core.c   (working copy)
@@ -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 *d
   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++)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-03-23 21:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-23 21:41 [patch] minor, obvious cleanup in df-core.c Steven Bosscher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).