diff options
author | Jim Grosbach <grosbach@apple.com> | 2010-08-19 02:47:08 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2010-08-19 02:47:08 +0000 |
commit | a0fc005321ac163f10ebc5216a85068a496969df (patch) | |
tree | dcb5018dec268aa79c5967a30e8a94d2380f43e0 /lib/CodeGen/PrologEpilogInserter.cpp | |
parent | 8a757aeac436ecd27e28a39b10032fd6fda33780 (diff) | |
download | llvm-a0fc005321ac163f10ebc5216a85068a496969df.tar.gz llvm-a0fc005321ac163f10ebc5216a85068a496969df.tar.bz2 llvm-a0fc005321ac163f10ebc5216a85068a496969df.tar.xz |
Update local stack block allocation to let PEI do the allocs if no additional
base registers were required. This will allow for slightly better packing
of the locals when alignment padding is necessary after callee saved registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111508 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/PrologEpilogInserter.cpp')
-rw-r--r-- | lib/CodeGen/PrologEpilogInserter.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/CodeGen/PrologEpilogInserter.cpp b/lib/CodeGen/PrologEpilogInserter.cpp index 569faceffd..4b8a4b5562 100644 --- a/lib/CodeGen/PrologEpilogInserter.cpp +++ b/lib/CodeGen/PrologEpilogInserter.cpp @@ -560,7 +560,7 @@ void PEI::calculateFrameObjectOffsets(MachineFunction &Fn) { // check for whether the frame is large enough to want to use virtual // frame index registers. Functions which don't want/need this optimization // will continue to use the existing code path. - if (EnableLocalStackAlloc && MFI->getLocalFrameSize()) { + if (EnableLocalStackAlloc && MFI->getUseLocalStackAllocationBlock()) { unsigned Align = MFI->getLocalFrameMaxAlign(); // Adjust to alignment boundary. @@ -593,7 +593,8 @@ void PEI::calculateFrameObjectOffsets(MachineFunction &Fn) { // Assign large stack objects first. for (unsigned i = 0, e = MFI->getObjectIndexEnd(); i != e; ++i) { - if (MFI->isObjectPreAllocated(i)) + if (MFI->isObjectPreAllocated(i) && + MFI->getUseLocalStackAllocationBlock()) continue; if (i >= MinCSFrameIndex && i <= MaxCSFrameIndex) continue; @@ -614,7 +615,8 @@ void PEI::calculateFrameObjectOffsets(MachineFunction &Fn) { // Then assign frame offsets to stack objects that are not used to spill // callee saved registers. for (unsigned i = 0, e = MFI->getObjectIndexEnd(); i != e; ++i) { - if (MFI->isObjectPreAllocated(i)) + if (MFI->isObjectPreAllocated(i) && + MFI->getUseLocalStackAllocationBlock()) continue; if (i >= MinCSFrameIndex && i <= MaxCSFrameIndex) continue; |