This is the mail archive of the
mailing list for the GCC project.
Re: [tcb] Incremental SSA updates
On Fri, 2005-02-11 at 17:14 +0100, Zdenek Dvorak wrote:
> > > nope. rewrite_into_loop_closed_ssa expects a valid ssa form on entry,
> > > and will not work correctly otherwise. If you need updating ssa form,
> > > you must do it by other means (rewrite_ssa_into_ssa in mainline).
> > Okay, then we need a rewrite_into_ssa (false) call before it.
> > I'll apply your patch and test such a change.
> this will not work. After moving the statements the way you do,
> without taking care of phi nodes, there is not sufficient information
> to restore ssa form and retain the semantics of the program.
Uh, of course their is.
You just have to be sure to mark what needs to be renamed, for renaming
(which we should be doing) and it will properly insert the phi nodes
that need to be inserted, if any.
> I think
> it would be more productive to just update ssa form properly directly
> (in the particular case handled by perfect_nestify it is fairly simple).
perfect_nestify was never intended to live for very long. It was always
the intention that it was there to handle perfect nest creation for a
number of cases until we had loop distribution that did it for us.
In a perfect world, this would have happened already. :)
> There are also other rather weird constructions in the perfect_nestify
> function (it updates loop structures, but at the end just throws everything
> away and calls flow_loops_find ???).
That was from the original code that didn't update loop structures. It
must have slipped back in during an update or something.
I'll bootstrap a few fixes to the code and remove the flow_loops_find
call along the way.