[PATCH] D38758: Utilize DQ-Form instructions for spill/restore and fix FrameIndex elimination to only use `lis/addi` if necessary
Lei Huang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 10 12:58:02 PDT 2017
lei created this revision.
Herald added a subscriber: qcolombet.
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 https://reviews.llvm.org/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:
1. The stack should be aligned according to the ABI
2. 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.
https://reviews.llvm.org/D38758
Files:
lib/Target/PowerPC/PPCInstrInfo.cpp
lib/Target/PowerPC/PPCRegisterInfo.cpp
test/CodeGen/PowerPC/fast-isel-conversion.ll
test/CodeGen/PowerPC/sjlj.ll
test/CodeGen/PowerPC/vsx-spill.ll
test/CodeGen/PowerPC/vsx.ll
test/CodeGen/PowerPC/vsxD-Form-spills.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38758.118459.patch
Type: text/x-patch
Size: 22862 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171010/a772fdcb/attachment.bin>
More information about the llvm-commits
mailing list