https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65862
--- Comment #13 from Wilco <wdijkstr at arm dot com> --- (In reply to Vladimir Makarov from comment #9) > Created attachment 35503 [details] > ira-hook.patch > > Here is the patch. Could you try it and give me your opinion about it. > Thanks. I tried it out and when forcing ALL_REGS to either GENERAL_REGS or FP_REGS based on mode it generates significantly smaller spillcode, especially on some of the high register pressure SPECFP2006 benchmarks like gamess. It is better than avoiding ALL_REGS if the cost is higher (like the PPC patch mentioned earlier) - this indicates that the case for preferring ALL_REGS for generic loads/stores is pretty thin and likely not beneficial overall. I'm glad with this we're moving towards a more conventional allocation scheme where the decision of which register class to use is made early rather than independently for each operand during allocation. I didn't do a full performance regression test but early results show identical performance with smaller codesize. Note that this doesn't solve the lra-constraints issue where it ignores the allocno class during spilling and just chooses the first variant that matches.