On Thu, 2020-07-23 at 14:25 -0500, Pat Haugen via Gcc-patches wrote: > Disable -fcaller-saves by default. > > This patch turns off -fcaller-saves by default so that IRA doesn't try > to use volatile regs for pseudos that are live across a call, which > would then require LRA to save/restore the reg around the call. > > Bootstrap/regtest on powerpc64le with no new regressions. Also ran a > CPU2017 benchmark comparison with no major differences (a few minor > improvements and one minor degradation). Ok for trunk? > > -Pat > > > 2020-07-23 Pat Haugen <pthau...@linux.ibm.com> > > gcc/ > * common/config/rs6000/rs6000-common.c > (rs6000_option_optimization_table): Turn off -fcaller-saves. > > gcc/testsuite/ > * gcc.target/powerpc/caller-saves.c: New. What's driving this change?
IRA will do a cost/benefit analysis to see using call clobbered registers like this is profitable or not. You're just turning the whole thing off. This can be particularly bad for performance if you have classes with no call saved registers. Jeff