This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH COMMITTED: Permit splitters to create new pseudo regs in combine


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]