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
- From: law at redhat dot com
- To: Andrew MacLeod <amacleod at redhat dot com>
- Cc: Steven Bosscher <s dot bosscher at student dot tudelft dot nl>, Diego Novillo <dnovillo at redhat dot com>, Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>, gcc mailing list <gcc at gcc dot gnu dot org>
- Date: Thu, 11 Dec 2003 12:39:44 -0700
- Subject: Re: [tree-ssa] Lazy updating of stmt operands
- Reply-to: law at redhat dot com
In message <1070979982.17702.2610.camel@p4>, Andrew MacLeod writes:
>So use get_immidiate_uses() which does what is required on demand, and
>if we discover its a serious performance issue down the road, it ought
>to be easy enough to change. The interface is abstracted out already.
>since operands are cached, a pass through the IL is actually pretty
>cheap. Its nothing like the expense of a pass through rtl.
Precisely.
>The effort and memory required to keep this information up to date
>throughout all compilations would not be insignificant, and until it is
>demonstrated that its a win to do so, I wouldn't want to keep it around
>all the time.
Right. We already went down that path. It was completely unusable.
>CCP uses the information, and one of the big compile time and memory
>savings on that pass was to optimize the immediate_uses code to only
>build it for SSA_NAMEs which we actually cared about. It was a
>significant memory hit to build it and have it around for all stmts.
>
>It would also be possible down the road, if it is an issue, to maintain
>the immediate uses information only for as long as it is required.
>Ie, get_stmt_operands could update the immediate_uses info if its
>present and we want to keep it up to date. Then if you have a string of
>optimizations that want the information, you can keep it up to date
>automatically.
Precisely.
jeff