This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] Copy propagation [patch]
- From: law at redhat dot com
- To: Diego Novillo <dnovillo at redhat dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 28 Feb 2003 18:20:23 -0700
- Subject: Re: [tree-ssa] Copy propagation [patch]
- Reply-to: law at redhat dot com
In message <1046480389 dot 6056 dot 22 dot camel at frodo>, Diego Novillo writes:
>On Fri, 2003-02-28 at 19:45, law at redhat dot com wrote:
>
>> FWIW, you can do this essentially for free while building the SSA
>> form, along with value numbering and simple copy propagations. In
>> addition to being effectively free, you also get to cut down on the
>> amount of code all the other SSA opts ever see.
>>
>Right. I forgot to mention that. I've still not decided whether I'll
>do the dominator opts first or the rewriting out of SSA. But it would
>probably be a good idea to get in sync first.
Well, given that you've got copy-prop done, we might as well go ahead
and use it to pound the ssa translator.
>One of the things we could probably do is the propagation of pointer
>copies. Once we are in SSA form, propagating pointers is a bit awkward
>because we need to update their associated INDIRECT_REFs and rewrite the
>VUSES for the statements that dereference them.
Yup.
>I also forgot to mention that since the regressions are only at runtime,
>I did some compile time tests. For insn-attrtab.c, copy propagation
>simplifies the program quite a bit, cutting the time for schedule 2 in
>half (compile time goes from 52 to 45 seconds). Right now it's largely
>meaningless, of course. Many of those copies we are removing may end up
>being re-added by the unSSA pass.
Yup.
>> Anyway, I'm damn close to having the double-gimplification problem
>> nailed down. There's a couple nits that I'm still tracking down, but
>> it's real real close.
>>
>Cool.
I think I found it. The inliner creates INIT_EXPRs :-0 If we don't
do a second simplification pass, they get through to the SSA code
unmolested. It's easy 'nuff to fix (in fact, prelim tests are
running now :-)
Oh yea, not only does this speed up gimplification, but the inliner
runs faster too :-)
jeff