This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] DCE and conditionals
- From: Andrew MacLeod <amacleod at redhat dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: Diego Novillo <dnovillo at redhat dot com>,gcc mailing list <gcc at gcc dot gnu dot org>
- Date: 05 May 2003 17:18:57 -0400
- Subject: Re: [tree-ssa] DCE and conditionals
- References: <200305052057.h45KvlJf026570@speedy.slc.redhat.com>
On Mon, 2003-05-05 at 16:57, law@redhat.com wrote:
> In message <1052167541.2909.116.camel@frodo.toronto.redhat.com>, Diego Novillo
> writes:
> >Ah, yes. So, keep the conditional expression. After you've brought the
> >program out of SSA form, run the linearizer once more. And, this time,
> >you untie its hands and let it trash COND_EXPRs that have both arms
> >empty. Similarly with other empty blocks that couldn't be removed
> >before because of PHI nodes.
> >
> >
> >> And in order for that to be effective, we
> >> should look at phi removal when possible since thats what ends up
> >> keeping the conditions alive...
> >>
> >PHIs that have all their arguments the same can be easily checked in the
> >linearizer.
> Note that PHI optimization/removal is pretty simple, except for one
> little problem. Specifically when there is a cycle in the PHI nodes.
>
> I've got skeleton code to do PHI -> copy transformations here, but
> there wasn't much point in doing anything with it until we support
> handling overlapping lifetimes.
Well, we're within an inch and a quarter of supporting them. Ive been
testing it by running copy-prop, and and I only have 1 additional
failure with copy-prop now. Of course, there is the matter of
bootstrapping left :-).
I think we're going to need it...
I also have a couple of hacks in place to work around things I need,
like the issue of never rewriting *p's... WHich I will document in the
hack.
Next day or two. I *think* I bootstrapped without copy prop, but I dont
remember so I have to try again.
Andrew