This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH COMMITTED: Permit splitters to create new pseudo regs in combine
- From: Ian Lance Taylor <iant at google dot com>
- To: Adam Nemet <anemet at caviumnetworks dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: 08 Aug 2007 16:52:28 -0700
- Subject: Re: PATCH COMMITTED: Permit splitters to create new pseudo regs in combine
- References: <m3sl7cc8a3.fsf@localhost.localdomain> <87k5sniyo5.fsf@localhost.localdomain.i-did-not-set--mail-host-address--so-tickle-me> <m3zm1aemqy.fsf@localhost.localdomain> <18106.14625.307504.391851@localhost.localdomain>
Adam Nemet <anemet@caviumnetworks.com> writes:
> I think (and I haven't tried this) that before the patch we would
> first turn this into:
>
> 5: (set X3 (add X1 (const_int E))) // X1 dead
> 6: (set X4 (add X3 (const_int F))) // X3 dead
> 4: (set X5 (add X4 (const_int D))) // X4 dead
>
> and then go on combining insn 6 and 4.
>
> After the patch we would get (Y is the new pseudo allocated by the
> backend):
>
> 5: (set Y (add X1 (const_int E))) // X1 dead
> 6: (set X4 (add Y (const_int F)))
> 4: (set X5 (add X4 (const_int D))) // X4 dead
>
> and now we couldn't combined insn 6 and 4 because of the missing dead
> note on Y in insn 6.
You're right; that is possible.
I think we should fix such cases as we discover them.
Ian