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 | 743d7c80e48e8ffbdf874bd14b5b45a47c1d7e56 (patch) | |
tree | 6e3b78ec4ad49d1998bdbf96b08a6d68d2167145 /llvm/lib/CodeGen/LocalStackSlotAllocation.cpp | |
parent | 6bcb07ad7152237597f2bd1cde4d6a3075e8ac0c (diff) | |
download | bcm5719-llvm-743d7c80e48e8ffbdf874bd14b5b45a47c1d7e56.tar.gz bcm5719-llvm-743d7c80e48e8ffbdf874bd14b5b45a47c1d7e56.zip |
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.
llvm-svn: 111508
Diffstat (limited to 'llvm/lib/CodeGen/LocalStackSlotAllocation.cpp')
-rw-r--r-- | llvm/lib/CodeGen/LocalStackSlotAllocation.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/LocalStackSlotAllocation.cpp b/llvm/lib/CodeGen/LocalStackSlotAllocation.cpp index b7071dec474..a4a43875cee 100644 --- a/llvm/lib/CodeGen/LocalStackSlotAllocation.cpp +++ b/llvm/lib/CodeGen/LocalStackSlotAllocation.cpp @@ -89,6 +89,13 @@ bool LocalStackSlotPass::runOnMachineFunction(MachineFunction &MF) { // Insert virtual base registers to resolve frame index references. insertFrameReferenceRegisters(MF); + // Tell MFI whether any base registers were allocated. PEI will only + // want to use the local block allocations from this pass if there were any. + // Otherwise, PEI can do a bit better job of getting the alignment right + // without a hole at the start since it knows the alignment of the stack + // at the start of local allocation, and this pass doesn't. + MFI->setUseLocalStackAllocationBlock(NumBaseRegisters > 0); + return true; } |