This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] More aggressive dead code elimination
- From: law at redhat dot com
- To: Steven Bosscher <s dot bosscher at student dot tudelft dot nl>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 07 Jan 2004 15:28:49 -0700
- Subject: Re: [tree-ssa] More aggressive dead code elimination
- Reply-to: law at redhat dot com
In message <200401072318.22342.s.bosscher@student.tudelft.nl>, Steven Bosscher
writes:
>
>--Boundary-00=_uWI//mGdhPjsA6T
>Content-Type: text/plain;
> charset="us-ascii"
>Content-Transfer-Encoding: 7bit
>Content-Disposition: inline
>
>Hi,
>
>This patch re-introduces the classic SSA DCE algorithm as described
>in Morgan's book. The current implementation takes the conservative
>approach and marks all conditional branches inherently necessary.
>This prevents us from removing some of them at the tree level. With
>this patch we do eliminate unnecessary branches, e.g. stuff like,
We decided a few months ago against using this approach to DCE due to
performance issues.
The code we have now misses two cases that the approach cited in Morgan
and other sources handles:
1. Useless loop removal. Frankly, I don't care about this.
2. If the last DCE pass kills a conditional it does not arrange to
kill the statements which feed the conditional. This can be
easily solved by re-running the DCE pass in that case. These are
extremely rare.
>Bootstrapped and regtested on i686-pc-linux-gnu. OK?
No. Sorry.
jeff