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

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

by Paolo Bonzini-3 :: Rate this Message:

Reply to Author | View in Thread


> 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

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