OSDN Git Service

[PowerPC] Manually schedule the prologue and epilogue
authorStefan Pintilie <stefanp@ca.ibm.com>
Tue, 9 Jan 2018 21:57:49 +0000 (21:57 +0000)
committerStefan Pintilie <stefanp@ca.ibm.com>
Tue, 9 Jan 2018 21:57:49 +0000 (21:57 +0000)
commita630e3e00c882541c3a59511bb94478d2d5dba79
treee6e100285e989966d13995419936df615748c929
parent8b2b7db396116a6a99af46a31faa0e3ad211dc76
[PowerPC] Manually schedule the prologue and epilogue

This patch makes the following changes to the schedule of instructions in the
prologue and epilogue.

The stack pointer update is moved down in the prologue so that the callee saves
do not have to wait for the update to happen.
Saving the lr is moved down in the prologue to hide the latency of the mflr.
The stack pointer is moved up in the epilogue so that restoring of the lr can
happen sooner.
The mtlr is moved up in the epilogue so that it is away form the blr at the end
of the epilogue. The latency of the mtlr can now be hidden by the loads of the
callee saved registers.

This commit is almost identical to this one: r322036 except that two warnings
that broke build bots have been fixed.

The revision number is D41737 as before.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322124 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/PowerPC/PPCFrameLowering.cpp
test/CodeGen/PowerPC/MCSE-caller-preserved-reg.ll
test/CodeGen/PowerPC/ppc-redzone-alignment-bug.ll
test/CodeGen/PowerPC/ppc-shrink-wrapping.ll
test/CodeGen/PowerPC/tls_get_addr_clobbers.ll
test/CodeGen/PowerPC/vsxD-Form-spills.ll