On 09/18/2016 06:42 AM, Jan Hubicka wrote:
while working on the GCN port I ended up with many redundant register copies
of the form
 mov reg, exec
 do something
 mov reg, exec
 do something
these copies are generated by LRA because exec is small register class and needs
a lot of reloading (it could be improved too, but I do not care because I want
to handle exec specially later anyway).

I was however suprised this garbage survives postreload optimizations.  It is 
to fix in regcprop which already does some noop copy elimination, but only
of the for mov reg, reg after substituting.

This patch implements it and eliminates many movs while running testsuite.
Bootstrapped/regtested x86_64-linux, OK?
Needs a ChangeLog. Ideally we'd have tests to verify we're catching these cases that survive the postreload optimizations.

With those OK. Possibly OK with just a ChangeLog if it's too damn painful to construct a consistent end-to-end testcase (this may be a good example where we could probably use David's framework to test this directly rather than via an end-to-end test).


Reply via email to