чт, 14 нояб. 2024 г. в 23:10, Vladimir Makarov <vmaka...@redhat.com>:
>
>
> On 11/13/24 14:10, Denis Chertykov wrote:
> > The fix for PR117191
> >
> > Wrong code appears after dse2 pass because it removes necessary insns.
> > (ie insn 554 - store to frame spill slot)
> > This happened because LRA pass doesn't cleanup the code exactly like
> > reload does.
> > The reload1.c has a special pass for such cleanup.
> > The reload removes CLOBBER insns with spill slots like this:
> > (insn 202 184 186 7 (clobber (mem/c:TI (plus:HI (reg/f:HI 28 r28)
> >                 (const_int 1 [0x1])) [3 %sfp+1 S16 A8])) -1
> >      (nil))
> >
> I guess not all functionality of reload was implemented (e.g. support
> for architecture with address in the memory address like vax).  The same
> happened with removing such clobbers. Implementation of LRA was a
> process of simplification and finding what minimal functionality would work.
>
> >
> >
> > LRA have a similar place where it removes unnecessary insns, but not
> > CLOBBER insns with
> > memory spill slots. It's `lra_final_code_change' function.
> >
> > I just mark a CLOBBER insn with pseudo spilled to memory for removing
> > it later together
> > with LRA temporary CLOBBER insns.
> >
> > The patch is simple.
> > On x86_64, it bootstraps+regtests fine.
> > Ok for trunk?
> >
> >
> Special clobbers with BLK mode can not be here and moreover memory for
> spilled pseudo can not get BLK mode.  So I think the patch is safe.
>
> The patch is OK for me.  Thank you for working on this issue.

committed fe1486e118d

Denis.

Reply via email to