This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] tree-cfg.c (create_bb): Remove unnecessary memset.


Hi,

Attached is a patch to remove unnecessary memset.

cfg.c:alloc_block uses ggc_alloc_cleared to allocate a basic block, so
we don't need to use memset again.

Tested on i686-pc-linux-gnu.  OK to apply?

Kazu Hirata

2004-11-06  Kazu Hirata  <kazu@cs.umass.edu>

	* tree-cfg.c (create_bb): Remove unnecessary memset.

Index: tree-cfg.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-cfg.c,v
retrieving revision 2.101
diff -u -d -p -r2.101 tree-cfg.c
--- tree-cfg.c	6 Nov 2004 15:57:25 -0000	2.101
+++ tree-cfg.c	6 Nov 2004 20:13:42 -0000
@@ -377,7 +377,6 @@ create_bb (void *h, void *e, basic_block
 
   /* Create and initialize a new basic block.  */
   bb = alloc_block ();
-  memset (bb, 0, sizeof (*bb));
 
   bb->index = last_basic_block;
   bb->flags = BB_NEW;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]