Currently we produce a bunch of unnecessary code when emitting the prologue/epilogue for spills/restores.
Namely, if the load from stack slot/store to stack slot instruction is an X-Form instruction, we will
always produce an LIS/ORI sequence for the stack offset.
Furthermore, we have not exploited the P9 vector D-Form loads/stores for this purpose.
This patch will address both issues.
Specifying the D-Form load as the instruction to use for stack spills/reloads should be safe because:
- The stack should be aligned according to the ABI
- If the stack isn't aligned, PPCRegisterInfo::eliminateFrameIndex() will check for the offset being a multiple of 16 and will convert it to an X-Form instruction if it isn't.
SPEC2017 performance run was done but none of the benchmarks showed any significant improvement.
SPEED UP Baseline/new SPEC_INT 500.perlbench_r 1.00 502.gcc_r 1.00 505.mcf_r 0.99 523.xalancbmk_r 1.00 525.x264_r 1.01 531.deepsjeng_r 1.00 541.leela_r 1.00 557.xz_r 1.00 SPEC_FP 508.namd_r 1.00 511.povray_r 1.00 519.lbm_r 1.00 538.imagick_r 1.00 544.nab_r 1.00