Re: [PATCH] Try to coalesce for unary and binary ops

2014-05-01 Thread Jeff Law
On 04/17/14 05:38, Richard Biener wrote: The patch below increases the number of coalescs we attempt to also cover unary and binary operations. This improves initial code generation for code like [ ... ] Expansion has special code to improve coalescing of op1 with target thus this is what w

Re: [PATCH] Try to coalesce for unary and binary ops

2014-04-22 Thread Michael Matz
Hi, On Fri, 18 Apr 2014, Steven Bosscher wrote: > IMHO TER should be improved to *do* disturb the order of the incoming > instructions, to reduce register pressure. The latter is the goal, yes. But TER isn't really the right place for that (it's constrained by too many invariants, running afte

Re: [PATCH] Try to coalesce for unary and binary ops

2014-04-18 Thread Richard Biener
On April 18, 2014 1:30:59 PM CEST, Steven Bosscher wrote: >On Thu, Apr 17, 2014 at 4:00 PM, Michael Matz wrote: >>> And to have sth that TER not immediately un-does we have >>> to disable TER which conveniently happens for coalesced >>> SSA names. >> >> So, instead TER should be improved to not d

Re: [PATCH] Try to coalesce for unary and binary ops

2014-04-18 Thread Steven Bosscher
On Thu, Apr 17, 2014 at 4:00 PM, Michael Matz wrote: >> And to have sth that TER not immediately un-does we have >> to disable TER which conveniently happens for coalesced >> SSA names. > > So, instead TER should be improved to not disturb the incoming instruction > order (except where secondary ef

Re: [PATCH] Try to coalesce for unary and binary ops

2014-04-18 Thread Eric Botcazou
> Now the question is what does this tell us? Not re-using > the same pseudo as op and target is always better? I think that "generally better" is the most appropriate wording, there is even a specific pass (web.c) to that effect. -- Eric Botcazou

Re: [PATCH] Try to coalesce for unary and binary ops

2014-04-17 Thread Michael Matz
Hi, On Thu, 17 Apr 2014, Richard Biener wrote: > The patch below increases the number of coalescs we attempt > to also cover unary and binary operations. This is not usually a good idea if not mitigated by things like register pressure measurement and using target properties to determine if it'

Re: [PATCH] Try to coalesce for unary and binary ops

2014-04-17 Thread Richard Biener
On Thu, 17 Apr 2014, Richard Biener wrote: > > The patch below increases the number of coalescs we attempt > to also cover unary and binary operations. This improves > initial code generation for code like > > int foo (int i, int j, int k, int l) > { > int res = i; > res += j; > res += k;

[PATCH] Try to coalesce for unary and binary ops

2014-04-17 Thread Richard Biener
The patch below increases the number of coalescs we attempt to also cover unary and binary operations. This improves initial code generation for code like int foo (int i, int j, int k, int l) { int res = i; res += j; res += k; res += l; return res; } from ;; res_3 = i_1(D) + j_2(D);