This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] tree-phinodes.c: Make make_phi_node static.
- From: Kazu Hirata <kazu at cs dot umass dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 04 Nov 2004 12:44:57 -0500 (EST)
- Subject: [patch] tree-phinodes.c: Make make_phi_node static.
Hi,
Attached is a patch to make make_phi_node static as it is called only
from tree-phinodes.c.
I don't think it is a good idea to expose this low-level function as
an extern function. Currently, a PHI node chain is maintained in
tree-phinodes.c. We don't want other modules to modify a PHI node
chain.
Bootstrapped on i686-pc-linux-gnu. OK to apply?
Kazu Hirata
2004-11-04 Kazu Hirata <kazu@cs.umass.edu>
* tree-phinodes.c (make_phi_node): Make it static.
* tree.h: Remove the prototypes for make_phi_node.
Index: tree-phinodes.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-phinodes.c,v
retrieving revision 2.17
diff -u -d -p -r2.17 tree-phinodes.c
--- tree-phinodes.c 2 Nov 2004 13:23:05 -0000 2.17
+++ tree-phinodes.c 3 Nov 2004 05:55:58 -0000
@@ -202,7 +202,7 @@ ideal_phi_node_len (int len)
definitions created when a variable is used without a preceding
definition). */
-tree
+static tree
make_phi_node (tree var, int len)
{
tree phi;
Index: tree.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree.h,v
retrieving revision 1.643
diff -u -d -p -r1.643 tree.h
--- tree.h 29 Oct 2004 14:05:43 -0000 1.643
+++ tree.h 3 Nov 2004 05:56:01 -0000
@@ -2768,7 +2768,6 @@ extern tree make_tree_vec_stat (int MEM_
/* Tree nodes for SSA analysis. */
-extern tree make_phi_node (tree, int);
extern void init_phinodes (void);
extern void fini_phinodes (void);
extern void release_phi_node (tree);