[PATCH] Fix PR37053: Move tweaks of commutative precedence to target hook

Paolo Bonzini paolo.bonzini@gmail.com
Sat Jun 27 12:41:00 GMT 2009


> I always assumed that one of the main uses of "%" was precisely to allow
> regs and mems to be swapped in order to satisfy constraints (which if I've
> understood correctly is all that m68k seems to be trying to do).  Declaring
> a non-pointer reg + a pointer mem to be noncanonical rtl seems far too strong
> at any stage of compilation.  I know 28690 was a serious performance problem,
> but I think we need to consider handling this in another way, separating out
> "try to achieve this" from "non-canonical".

Also FWIW, this is exactly how I feel.  I don't have big problems with 
Maxim's second patch, but only because '%' is basically unused except 
for some optimizations within reload.  As Maxim taught me (either I 
remembered wrong or I was really convinced this was not the case), % is 
not used for matching, so it only really applies whenever two things 
have the same precedence in the first place.

A third patch could be to extend the usage of '%' but that's probably 
not a good idea either (what happens if the inverted pair does not 
satisfy the predicates?) and would require considerably more surgery.

I wonder how much of the performance can be kept on Power6 if you just 
attack PR28690 within md_reorg.  The only problem would be if the index 
was allocated in r0.

Paolo



More information about the Gcc-patches mailing list