Re-apply r112883:
authorJim Grosbach <grosbach@apple.com>
Fri, 3 Sep 2010 18:37:12 +0000 (18:37 +0000)
committerJim Grosbach <grosbach@apple.com>
Fri, 3 Sep 2010 18:37:12 +0000 (18:37 +0000)
commit65482b1bb873dd820f54a24a2f34bd65f2669e5c
tree65cf47ec2ea54d13605d4e5a3e2702250b543a37
parent1e3aeefc088db2fe32958eb17f46e60011d34949
Re-apply r112883:
"For ARM stack frames that utilize variable sized objects and have either
large local stack areas or require dynamic stack realignment, allocate a
base register via which to access the local frame. This allows efficient
access to frame indices not accessible via the FP (either due to being out
of range or due to dynamic realignment) or the SP (due to variable sized
object allocation). In particular, this greatly improves efficiency of access
to spill slots in Thumb functions which contain VLAs."

r112986 fixed a latent bug exposed by the above.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112989 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMBaseRegisterInfo.cpp
lib/Target/ARM/ARMBaseRegisterInfo.h
lib/Target/ARM/Thumb1RegisterInfo.cpp
test/CodeGen/Thumb/dyn-stackalloc.ll
test/CodeGen/Thumb2/2010-04-15-DynAllocBug.ll