OSDN Git Service

Re-apply r110655 with fixes. Epilogue must restore sp from fp if the function stack...
authorEvan Cheng <evan.cheng@apple.com>
Tue, 10 Aug 2010 19:30:19 +0000 (19:30 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Tue, 10 Aug 2010 19:30:19 +0000 (19:30 +0000)
commitac096808a3accc516ae7c193c9a2c1392bf3301a
tree7add14add83e0e065548a9ad801a591251ca6a83
parent98197e55c10176c3ef9100f7d852abbd2347225f
Re-apply r110655 with fixes. Epilogue must restore sp from fp if the function stack frame has a var-sized object.

Also added a test case to check for the added benefit of this patch: it's optimizing away the unnecessary restore of sp from fp for some non-leaf functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110707 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMBaseRegisterInfo.cpp
lib/Target/ARM/ARMISelLowering.cpp
lib/Target/ARM/ARMMachineFunctionInfo.h
lib/Target/ARM/ARMRegisterInfo.td
lib/Target/ARM/Thumb1RegisterInfo.cpp
test/CodeGen/Thumb/large-stack.ll
test/CodeGen/Thumb2/2010-08-10-VarSizedAllocaBug.ll [new file with mode: 0644]