This is the mail archive of the gcc@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: Use-and-clobber insns and REG_DEAD notes (fwd)


Hi,

On Tue, 15 Jul 2003, Richard Henderson wrote:

> > > I think that the death note SHOULD exist in the clobber case.
> > In this particular case, right?
> Um?

Your initial sentence could have been understood as you wanting to add
death notes for clobbers (or at least I was reading it that way first ;)).
I only wanted to clarify that the REG_DEAD was justified only in the
particular case Ulrich talked about, because it contained a _use_ of that
register (and a clobber which is the reason it died).

> > flow added a REG_UNUSED for the clobber, which I think is wrong.
>
> Yes, in this case, because as I recall the register *was* used
> in the insn.

A REG_UNUSED note is added for a register which isn't used _later_.  If
it's used in the same instruction is irrelevant (or should be) IMHO.
Therefore adding REG_UNUSED for clobbers doesn't make sense, as it anyway
can't be used later.

> > Adding a REG_DEAD for a clobber doesn't make sense IMO.
>
> Not because of the clobber per-se, but because that's
> where the register dies.

Yes.  It dies because of the clobber, but a REG_DEAD is added because of
the use.  IOW an insn only containing a clobber, but no use of that reg
should carry no notes (for that reg) at all.


Ciao,
Michael.


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