This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] PR33600, fallout from pr33552 fix
Hi,
On Tue, 2 Oct 2007, Jakub Jelinek wrote:
> On Mon, Oct 01, 2007 at 05:46:01PM +0200, Michael Matz wrote:
> > So, I rather leave in the harmless short-living code pessimization which
> > will be magically fixed by coalescing, instead of reducing the number of
> > cases where this transformation applies. I hold off committing the patch
> > for now nevertheless to hear your opinion about the above.
>
> If you think RA's coalescing will fix this up, then why not do this
> optimization through creating a new pseudo and only replacing the
> input/output pair that needs it?
That was done before my patch, and lead the the non-compile of glibc.
> So for
> asm ("... " : "=r" (i) : "0" (j), "r" (j));
> this would add
> (set (reg temp_pseudo) (reg j))
> asm ("... " : "=r" (temp_pseudo) : "0" (temp_pseudo), "r" (j));
> (set (reg i) (reg temp_pseudo))
Because then we again have two inputs (temp_pseudo and j), where formerly
we had only one. Not to mention the additional move insn back into the
former output. The RA coalescing is not the goal of this pass, it just
happens to make the possible code pessimization be harmless.
Ciao,
Michael.