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

Re: [tree-ssa] How to increase PHI capacity?


Op ma 04-08-2003, om 22:21 schreef Diego Novillo:
> On Mon, 2003-08-04 at 16:04, Steven Bosscher wrote:
> 
> > AFAICT we allocate the phi args array as an integral part of the phi
> > node itself, similar to how we allocate ops for tree_expr nodes:
> > 
> Oh, right, how could I forget.  Sorry about that.
> 
> But still, even if you create a new PHI node, all you need to do is
> insert it in the phi_nodes() list for the basic block that contains it.

Yes.  But I need a phi with increased capacity.  Inserting a whole new
phi is childs play.

> > struct tree_phi_node GTY(())
> > {
> >   struct tree_common common;
> >   tree result;
> >   int num_args;
> >   int capacity;
> >   struct phi_arg_d GTY ((length ("((tree)&%h)->phi.capacity"))) a[1];
> > };
> > 
> Now I'm wondering if it wouldn't be better to make a[] a tree_vec so
> that we can reallocate it independently of the PHI node itself.

No, because phi_arg_d is not a tree (ie. it doesn't include tree_common
and it's not in union tree_node).  You wouln't even get passed the tree
checks for TREE_VEC.

Gr.
Steven


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