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
On Fri, 2003-12-12 at 14:24, Zdenek Dvorak wrote:
> Hello,
>
> > I suspect the loop optimizations are going to fall into the same
> > category as CCP in that they are going to be interested in the immediate
> > uses of only a partial subset of variables most of the time. I think its
> > far more efficient to calculate those when you need them/know what they
> > are, and possibly maintain just those def->uses.
>
> hardly; you still must scan all statements to find the uses, so I don't
> see where you would want to get the extra efficiency.
>
Scanning stmts is very cheap. The uses/defs are all cached. Its barely
even measurable. If you can trim the number of stmt's you are looking at
for immediate_uses by even 50%, you are going to save a lot of memory on
your def-use chains, and you'll have less memory swapping problems.
And if you do need it over a chain of optimizations, do it once, and
then keep the info up to date/. You'll be a lot better off I think
Andrew.