[patch] tree-phinodes.c: Make make_phi_node static.

Jeffrey A Law law@redhat.com
Tue Nov 9 16:55:00 GMT 2004


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.

jeff




More information about the Gcc-patches mailing list