Re: RFA: Tighten checking for 'X' constraints

2014-04-19 Thread Richard Sandiford
Jeff Law writes: > On 04/16/14 07:37, Jakub Jelinek wrote: >> >> Creating a (mem (scratch)) too early may pessimize code too much, >> perhaps it can be used during say sched1 etc. for alias analysis, (mem >> (scratch)) is considered to alias everything,. >> Plus, I think at least so far we have no

Re: RFA: Tighten checking for 'X' constraints

2014-04-16 Thread Jeff Law
On 04/16/14 07:37, Jakub Jelinek wrote: Creating a (mem (scratch)) too early may pessimize code too much, perhaps it can be used during say sched1 etc. for alias analysis, (mem (scratch)) is considered to alias everything,. Plus, I think at least so far we have not been doing different decisions

Re: RFA: Tighten checking for 'X' constraints

2014-04-16 Thread Richard Sandiford
Eric Botcazou writes: >> Anyway, others can have different opinion on what "X" should mean, >> CCing Jeff and Eric. > > I personally think that we should not change it and adjust LRA instead to > error out instead of ICEing (even if this means erroring out in a few more > cases with LRA than wit

Re: RFA: Tighten checking for 'X' constraints

2014-04-16 Thread Eric Botcazou
> Anyway, others can have different opinion on what "X" should mean, > CCing Jeff and Eric. I personally think that we should not change it and adjust LRA instead to error out instead of ICEing (even if this means erroring out in a few more cases with LRA than with reload for now, e.g. gcc.dg/to

Re: RFA: Tighten checking for 'X' constraints

2014-04-16 Thread Jakub Jelinek
On Wed, Apr 16, 2014 at 02:24:06PM +0100, Richard Sandiford wrote: > > side-effect of inline-asm on certain location in memory, but don't really > > need the address of that memory. Often "memory" is too big hammer, > > people often say that certain inline-asm uses or sets or uses/sets or > > clob

Re: RFA: Tighten checking for 'X' constraints

2014-04-16 Thread Richard Sandiford
Jakub Jelinek writes: > On Wed, Apr 16, 2014 at 11:43:12AM +0100, Richard Sandiford wrote: >> "X" was defined against reload, which always reloaded MEM addresses >> to follow the appropriate base and index register classes. This was >> done as a first pass before matching against the constraints:

Re: RFA: Tighten checking for 'X' constraints

2014-04-16 Thread Jakub Jelinek
On Wed, Apr 16, 2014 at 11:43:12AM +0100, Richard Sandiford wrote: > "X" was defined against reload, which always reloaded MEM addresses > to follow the appropriate base and index register classes. This was > done as a first pass before matching against the constraints: I think it would be fine i

Re: RFA: Tighten checking for 'X' constraints

2014-04-16 Thread Richard Sandiford
Andrew Pinski writes: > On Tue, Apr 15, 2014 at 1:53 PM, Richard Sandiford > wrote: >> As Robert pointed out here: >> >> http://gcc.gnu.org/ml/gcc-patches/2014-04/msg00416.html >> >> we're a bit too eager when folding stuff into an 'X' constraint. >> The value at expand time is sensible, but

Re: RFA: Tighten checking for 'X' constraints

2014-04-16 Thread Richard Sandiford
Jakub Jelinek writes: > On Tue, Apr 15, 2014 at 09:53:16PM +0100, Richard Sandiford wrote: >> As Robert pointed out here: >> >> http://gcc.gnu.org/ml/gcc-patches/2014-04/msg00416.html >> >> we're a bit too eager when folding stuff into an 'X' constraint. >> The value at expand time is sensib

Re: RFA: Tighten checking for 'X' constraints

2014-04-16 Thread Andrew Pinski
On Tue, Apr 15, 2014 at 1:53 PM, Richard Sandiford wrote: > As Robert pointed out here: > > http://gcc.gnu.org/ml/gcc-patches/2014-04/msg00416.html > > we're a bit too eager when folding stuff into an 'X' constraint. > The value at expand time is sensible, but after that asm_operand_ok > allow

Re: RFA: Tighten checking for 'X' constraints

2014-04-16 Thread Jakub Jelinek
On Tue, Apr 15, 2014 at 09:53:16PM +0100, Richard Sandiford wrote: > As Robert pointed out here: > > http://gcc.gnu.org/ml/gcc-patches/2014-04/msg00416.html > > we're a bit too eager when folding stuff into an 'X' constraint. > The value at expand time is sensible, but after that asm_operand_