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-phinodes.c: Speed up create_phi_node.


Hi,

Attached is a patch to speed up create_phi_node.

make_phi_node zeros a newly allocated PHI node (and one taken out of
the free list), so we don't need to zero PHI_REWRITTEN again.

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

Kazu Hirata

2004-10-29  Kazu Hirata  <kazu@cs.umass.edu>

	* tree-phinodes.c (create_phi_node): Don't zero PHI_REWRITTEN.

Index: tree-phinodes.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-phinodes.c,v
retrieving revision 2.14
diff -u -d -p -r2.14 tree-phinodes.c
--- tree-phinodes.c	29 Oct 2004 21:41:30 -0000	2.14
+++ tree-phinodes.c	29 Oct 2004 22:11:47 -0000
@@ -276,10 +276,6 @@ create_phi_node (tree var, basic_block b
 
   phi = make_phi_node (var, EDGE_COUNT (bb->preds));
 
-  /* This is a new phi node, so note that is has not yet been
-     rewritten.  */
-  PHI_REWRITTEN (phi) = 0;
-
   /* Add the new PHI node to the list of PHI nodes for block BB.  */
   PHI_CHAIN (phi) = phi_nodes (bb);
   bb_ann (bb)->phi_nodes = phi;


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