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] Lazy updating of stmt operands


On Sun, 2003-12-07 at 12:14, Zdenek Dvorak wrote:

> right.  But this would as well be the case if the information was always
> kept up-to-date.
> 
Not possible.  In DOM we build hash tables that do value numbering on
the operands and voperands.  If we used and eager scheme to keep this
information up-to-date, we would not be able to remove statements from
hash tables after modifying them.  See how DOM very carefully avoids
calling get_stmt_operands while it's doing its thing.

Also, mark_new_vars_to_rename relies on the stale operands to still be
there to find what variables need to be renamed.

Changing the current lazy approach into an eager scheme, would mean
modifying several, seemingly unrelated, things.


> > tree-dfa.c:compute_immediate_uses()
> 
> Which needs to pass through every single statement in the program. Not
> really terribly efficient.
> 
*shrug*, it's used by SSA-CCP.  Since def-use edges are only needed by
some passes, I don't think it would be worth our while trying to
maintain them in get_stmt_operands.

But I'm ready to be convinced otherwise.  Say, with an implementation
comparing both approaches with timings over a reasonable code base (a
typical GCC bootstrap or one of the compile-time related PRs).


Diego.


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