This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] Lazy updating of stmt operands
Hello,
> > > something like
> > > bool immediate_uses_avail_p (tree ssa_name)
> > > or
> > > bool immediate_uses_avail_p (tree stmt)
> > >
> > > Presumably the latter, but both are easy to provide.
> >
> > ??? I don't really quite get you. Either the information should be
> > available for every statement or not at all. Having something in the
> > middle is just confusing.
> >
>
> I dont see why. If you want to track just a few variables, why should
> you pay for tracking 45,000?
because you generally don't know which variables you are interested in.
Also chosing the different ones in the different passes requieres
recomputing the information, and it is not at all obvious to me whether
this would not make this actually more expensive.
> Now, it may turn out that we get a reasonably efficient implemnation
> evetually it wont be an issue, but it will be an issue for the
> forseeable near future I think.
I am not sure whether this is not saving on the wrong place. You need
some 12 bytes per operand (perhaps 8, with some extra effort), which
seems incomparable to the amount of memory we waste everywhere else.
> Actually, come to think of it, you ought to never merge blocks if there
> is *any* phi node. If we do implement immediate_uses, then when we
> remove the PHi argument which reduces the PHI to a single argument, we
> will also remove the PHI at the same time using the uses info, so you
> will never see a PHI with a single argument if the inforamtion is
> available. If it isn't available, you are going to punt and not do the
> merge anyway. So if you see a PHI, punt.
Yes, this would be cool (and actually a great argument for keeping the
immediate uses of all variables up-to-date at all times :-)
Zdenek