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 we try to match here.

Overall there are positive and negative size effects during
a bootstrap on x86_64, but overall it seems to be a loss
- stage3 cc1 text size is 18261647 bytes without the patch
compared to 18265751 bytes with the patch.

Now the question is what does this tell us?  Not re-using
the same pseudo as op and target is always better?
Coalescing has always been and probably always will be a transformation that can help or hurt code. At the level where you're applying it I suspect there aren't any really good heuristics to determine when it's likely profitable vs not profitable.

I'd tend to lean towards coalescing is good here, but would want to investigate the regressions a bit to see if there's something systematic going on that causes us to generate poor code in some small number of situations that we might be able to fix.

You might even initially restrict to just coalescing on unary operators until we have better heuristics on binary operators.

Also note all that may end up hurting risc targets.

Jeff

Reply via email to