OSDN Git Service

[PowerPC] Manually schedule the prologue and epilogue
authorStefan Pintilie <stefanp@ca.ibm.com>
Mon, 8 Jan 2018 22:23:10 +0000 (22:23 +0000)
committerStefan Pintilie <stefanp@ca.ibm.com>
Mon, 8 Jan 2018 22:23:10 +0000 (22:23 +0000)
commitecb72f4119329da830d94ea651d7eb695321c90a
tree99693fa5bf9ba977aa44cee541b9ac9b8e60e32c
parente9fb716fe6bef40c810baaece077017345b7157a
[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.

Differential Revision: https://reviews.llvm.org/D41737

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322036 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