On Mon, 2020-06-01 at 02:28 +0900, Oleg Endo wrote:
> Hi Jeff,
> 
> On Sun, 2020-05-31 at 11:20 -0600, Jeff Law via Gcc-patches wrote:
> > The peephole2 pass makes some attempt to update various notes, but that
> > doesn't
> > include REG_INC notes.  While I could trivially fix this in the H8 port, I
> > wouldn't be terribly surprised if the lack of a REG_INC note could cause
> > problems
> > on other ports.  So I think it's best to fix in the peephole pass.
> > 
> > As it turns out we already have  a function (two copies even!) to scan an
> > insn
> > for auto-inc addressing modes and add an appropriate note.
> > 
> > This patch moves that code from reload & lra into rtlanal.c and calls it 
> > from
> > the
> > peephole pass.
> 
> I ran into this issue a while ago.
> See also config/sh/sh.c, function sh_check_add_incdec_notes.
> 
> Is it possible to somehow fold all that into a universal solution?
I think the only notable difference here is sh_check_add_incdec_notes verifies
there's no note on the INSN first.  I think if we added that check into the
generic code we could probably drop sh_check_add_incdec_notes.


Jeff

Reply via email to