[tcb] Incremental SSA updates

Daniel Berlin dberlin@dberlin.org
Fri Feb 11 17:21:00 GMT 2005


> -- I had to disable lambda-code.c:perfect_nestify in case there are exit phi
>    nodes for the outer loop (this causes a regression -- ltrans1.c is no
>    longer optimized).  The reason is that perfect_nestify behaves
>    wrong in this case -- it keeps the exit phi nodes in the original
>    loop, although some of the values may be defined in the part of the
>    code that was moved to the new loop, thus causing failures in
>    verify_ssa.  Just moving the phi nodes to the exit of the new loop
>    is not right either (this fails in case the values are defined in the
>    inner loop). 
>   I am not really sure whether I interpret the code
>    correctly, or why this does not fail without the patch; Daniel, could
>    you please have a look?

I believe we went over this before. you aren't actually interpreting the
code correctly, because that's not where the real bug is.
The mark_for_rewrite call you removed was there to keep it from
releasing the phi node names while we moved them.  If you don't have it,
it will simply release them when we remove the phi nodes from one block,
and then they get reused, but are still referenced in the copies we
moved, as well as wherever else they got reused, which is the real
reason why you get verify_ssa failures.

This could be fixed by generating new names/phis that are exactly like
the old ones except in name, and replacing the immediate uses of the old
ones with the new ones.
However, the api to do that wasn't really around at the time i wrote the
code :)
Feel free to do it if you like.
I'll get around to it eventually :)




More information about the Gcc-patches mailing list