This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [lno, tree-ssa] Fix kill_redundant_phi_nodes
On Thu, 2004-05-20 at 15:18, Zdenek Dvorak wrote:
> I need it as a cleanup pass (in the loop optimizer on lno-branch).
> There I really do not want to call full dom + dce pass just to handle
> this.
>
As I said before, the idea is to decompose DOM into lego-like modules
that can be used independently or as a single pass. One would be able
to schedule minor cleanup passes. Regular DCE should already be fast
enough to not matter if you call repeatedly.
I will only remove kill_redundant_phi_nodes if I'm in a position to
offer the above as an alternative.
> Removing some unreachable code may create situation like
>
> Label0:
> k_1 = phi (k_0, i_1)
>
> Label1:
> i_1 = phi (i_0, i_1);
>
> if (something)
> goto ex1;
>
> goto Label1;
> ex1:
>
> ...
> goto Label0;
>
> In the moment DOM processes the phi node for k_1, it has no way how to
> determine that the phi node is redundant. So DOM cannot handle this
> situation without iterating it, which is not good since it is relatively
> expensive.
>
OK. Thanks.
Diego.