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
This commit is contained in:
Jim Grosbach
2010-08-19 02:47:08 +00:00
parent 8a757aeac4
commit a0fc005321
3 changed files with 28 additions and 3 deletions

View File

@@ -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;
}