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: PR 13722 candidate fix


On Thu, 2004-01-22 at 23:43, Zack Weinberg wrote:
> Under what circumstances should REG_INC notes be tagged onto the insns
> emitted here?  It's currently done only for POST_MODIFYs, but this
> patch will generate POST_INC and POST_DEC as well.

I believe the answer is that we need it for all auto-inc addresses.  The
REG_INC note indicates that the instruction has another side-effect
besides the sets and clobbers.  Any routines that care about instruction
side-effects aren't going to notice the auto-inc address unless the
REG_INC note is there.

The fact that we only do this after reload reduces the chances of a
problem, but the rtlanal.c reg_set_p function needs it, and it is likely
that there is already some code somewhere after reload that directly or
indirectly calls reg_set_p.  Thus the REG_INC notes should be added to
be safe.
-- 
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com


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