Re: Volatile memory is not general operand

2011-02-11 Thread Paulo J. Matos
On 11/02/11 13:56, Michael Matz wrote: The piece of code you quoted also is conditional on volatile_ok. Connect that with what Eric said. Thanks Michael, I guess I should sleep before asking anything else. Now I understand what Eric said.

Re: Volatile memory is not general operand

2011-02-11 Thread Michael Matz
Hi, On Fri, 11 Feb 2011, Paulo J. Matos wrote: > On 11/02/11 12:03, Eric Botcazou wrote: > > > if (! volatile_ok&& MEM_VOLATILE_P (op)) > > > return 0; > >. > > > > It's more of the other way around: MEM_VOLATILE_P is a general operand > > unless > > explicitly requested via init

Re: Volatile memory is not general operand

2011-02-11 Thread Paulo J. Matos
On 11/02/11 12:03, Eric Botcazou wrote: if (! volatile_ok&& MEM_VOLATILE_P (op)) return 0; . 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 o

Re: Volatile memory is not general operand

2011-02-11 Thread Eric Botcazou
> 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

Volatile memory is not general operand

2011-02-11 Thread Paulo J. Matos
Hi, 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