This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: note_stores vs. PRE_DEC, POST_INC and so on
- From: Ian Lance Taylor <iant at google dot com>
- To: Rask Ingemann Lambertsen <rask at sygehus dot dk>
- Cc: gcc at gcc dot gnu dot org
- Date: 08 Jun 2007 13:17:39 -0700
- Subject: Re: note_stores vs. PRE_DEC, POST_INC and so on
- References: <20070608192130.GO5690@sygehus.dk>
Rask Ingemann Lambertsen <rask@sygehus.dk> writes:
> The comment for note_stores() (in rtlanal.c) says:
>
> /* Call FUN on each register or MEM that is stored into or clobbered by X.
> (X would be the pattern of an insn).
>
> But this doesn't happen when a register is modified by e.g. a PRE_DEC
> expression. Is this an oversight or intentional? If intentional, the comment
> should say so and perhaps also why.
The note_stores interface doesn't really provide a way to handle
PRE_DEC or other such expressions. We could change that by redefining
the interface, but we would need to audit all the calls to
note_stores. That would be a good idea in any case since it is
certainly possible, even likely, that some of them should be handle
autoincrement expressions but aren't.
Ian