Avoid reserving an ARM base pointer during register allocation.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Thu, 5 Jan 2012 00:26:52 +0000 (00:26 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Thu, 5 Jan 2012 00:26:52 +0000 (00:26 +0000)
commit54f3b7a9109d1916cf25ffdb2ed5045f03121b5a
treeb29f564fb7d6a34f867b25e2c23f79076560e465
parentd9e5c764bfea339fc5082bf17e558db959fd6d28
Avoid reserving an ARM base pointer during register allocation.

Once register allocation has started the reserved registers are frozen.

Fix the ARM canRealignStack() hook to respect the frozen register state.
Now the hook returns false if register allocation was started with frame
pointer elimination enabled.

It also returns false if register allocation started without a reserved
base pointer, and stack realignment would require a base pointer.  This
bug was breaking oggenc on armv6.

No test case, an upcoming patch will use this functionality to realign
the stack for spill slots when possible.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147578 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMBaseRegisterInfo.cpp