This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Volatile memory is not general operand
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: "Paulo J. Matos" <pocmatos at gmail dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 11 Feb 2011 13:03:26 +0100
- Subject: Re: Volatile memory is not general operand
- References: <ij3606$ig0$1@dough.gmane.org>
> I just noticed something very surprising. There's a clause in
> general_operand (recog.c):
>
> if (! volatile_ok && MEM_VOLATILE_P (op))
> return 0;
>
> Oh... so, a MEM_VOLATILE_P is _not_ a general operand? Why? This is also
> not referred to in the documentation of general operand so it kind of
> caught me by surprise.
It's more of the other way around: MEM_VOLATILE_P is a general operand unless
explicitly requested via init_recog_no_volatile. Some passes, like combine,
don't track the volatileness of operands precisely, so they disable their
manipulation altogether to avoid generating wrong code.
--
Eric Botcazou