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]

Re: Reload bug (missing REG_INC note) & questions


>   In message <200001102019.MAA05252@netcom.com>you write:
>   > > 
>   > > jeff
>   > 
>   > I just realized there's another bug in reload1.c/add_auto_inc_notes():
>   > I don't see any code to remove stale REG_INC notes, which is another 
>   > problem I mentioned in my reorg.c patch.
> No.  You just haven't read closely.
> 
> 
>        while (*pnote != 0)
>           {
>             if (REG_NOTE_KIND (*pnote) == REG_DEAD
>                 || REG_NOTE_KIND (*pnote) == REG_UNUSED
>                 || REG_NOTE_KIND (*pnote) == REG_INC
>                 || REG_NOTE_KIND (*pnote) == REG_RETVAL
>                 || REG_NOTE_KIND (*pnote) == REG_LIBCALL)
>               *pnote = XEXP (*pnote, 1);
>             else
>               pnote = &XEXP (*pnote, 1);
>           }
> 
> #ifdef AUTO_INC_DEC
>         add_auto_inc_notes (insn, PATTERN (insn));
> #endif
> jeff

Aha! That chunk was missing out of my code. Adding it fixed the problem 
with REG_INC notes.

It looks like the reorg patch is still required for egcs-current, though.

Toshi


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