This is the mail archive of the
mailing list for the GCC project.
Re: [patch] tree-phinodes.c: Make make_phi_node static.
- From: Jeffrey A Law <law at redhat dot com>
- To: Dorit Naishlos <DORIT at il dot ibm dot com>
- Cc: Kazu Hirata <kazu at cs dot umass dot edu>, gcc-patches at gcc dot gnu dot org
- Date: Tue, 09 Nov 2004 09:46:10 -0700
- Subject: Re: [patch] tree-phinodes.c: Make make_phi_node static.
- Organization: Red Hat, Inc
- References: <OF1AEAF6B8.2AC75B36-ONC2256F45.0039A7A8-C2256F45.004B078F@il.ibm.com>
- Reply-to: law at redhat dot com
On Sun, 2004-11-07 at 15:39 +0200, Dorit Naishlos wrote:
> > Attached is a patch to make make_phi_node static as it is called only
> > from tree-phinodes.c.
> I actually added a call to make_phi_node in my patch to tree-vectorizer.c -
> http://gcc.gnu.org/ml/gcc-patches/2004-11/msg00283.html. We're creating new
> phis (in a new basic block) that correspond to phis in another basic block
> and we want these phis to be in the same order because in some cases we
> need to redefine the arguments of the new phis (this happens soon after
> they are created). The code to do that becomes very compact and efficient
> if we know that the phis are arranged this way. create_phi_node however
> adds new phis in a reversed order, so I added an internal version of
> create_phi_node in the vectorizer ("slpeel_create_phi_node") that adds the
> phis in a "straight" order (and calls make_phi_node to do that). I'd have
> to move this function to tree-phinodes.c if make_phi_node was made static.
> I don't know if that's desirable?
It seems to me we can/should probably provide the capability to
create PHI nodes in block X in the same order in which they appear
in block Y from within tree-phinodes.c.