This is the mail archive of the 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]

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

Hi Dorit,

> I actually added a call to make_phi_node in my patch to tree-vectorizer.c -
> 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?

I understand your concern.  I would prefer either

1) using the combination of create_phi_node and nreverse, or

2) moving your slpeel_create_phi_node to tree-phinodes.c.

In any case, code to manipulate PHI node chain doesn't seem to belong
to the vectorizer.

I was actually thinking about addressing this issue.  The main
difficulty is that people want to copy a chain of PHI nodes while
doing different things.

Kazu Hirata

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