On 04/15/2011 04:18 PM, Jeff Law wrote:

> http://gcc.gnu.org/ml/gcc-patches/2011-03/msg02247.html

I don't know. I sympathize with the goal, but I'm not too happy about
the structure of this patch. Doesn't this do the scan once for every
reload in an insn? It seems to me like the loop (or rather, a function
call to it) should at least be placed at the top of choose_reload_regs
rather than in allocate_reload_reg.

In my tests (i686-linux, compiling my standard set of testcases) the
patch appears to have, in general, very little effect on code quality.
It might on average be slightly better, but I've also seen several cases
where we do worse. If we go to so much effort to do scanning of
subsequent insns it ought to be possible to do better.

AFAICT the patch ignores whether the pseudo that's being reloaded will
be reloaded again in the current ebb - if not, it should get a "bad"
spill register, where "bad" in this case only includes hard regs that
don't currently hold a spilled pseudo. Likewise, once we've reloaded the
last occurrence of a pseudo in an ebb, we should forget the
reg_reloaded_contents to make sure we consider the spill reg good again.
However, I'm not sure whether changes such as these alone will reduce
the number of cases where the patch regresses.


Bernd

Reply via email to