[AArch64] Break the dependency between FP and SP when possible.
authorChad Rosier <mcrosier@codeaurora.org>
Mon, 14 Mar 2016 18:17:41 +0000 (18:17 +0000)
committerChad Rosier <mcrosier@codeaurora.org>
Mon, 14 Mar 2016 18:17:41 +0000 (18:17 +0000)
commit6d986550707568a459e50c581cb79aef9e3072bb
treebe04bea0592457093d164f0bb84d592f448cecf0
parentde89d5f81fb647e9744e4583bb0d77dc6a237b42
[AArch64] Break the dependency between FP and SP when possible.

When the SP in not changed because of realignment/VLAs etc., we restore the SP
by using the previous value of SP and not the FP. Breaking the dependency will
help in cases when the epilog of a callee is close to the epilog of the caller;
for then "sub sp, fp, #" depends on the load restoring the FP in the epilog of
the callee.

http://reviews.llvm.org/D18060
Patch by Aditya Kumar and Evandro Menezes.

llvm-svn: 263458
llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
llvm/lib/Target/AArch64/AArch64MachineFunctionInfo.h
llvm/test/CodeGen/AArch64/arm64-hello.ll
llvm/test/CodeGen/AArch64/arm64-patchpoint.ll
llvm/test/CodeGen/AArch64/arm64-shrink-wrapping.ll
llvm/test/CodeGen/AArch64/fastcc.ll