diff options
author | Evan Cheng <evan.cheng@apple.com> | 2007-01-25 22:12:41 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2007-01-25 22:12:41 +0000 |
commit | 02a20291410a6814c657b69901a57103d4861a07 (patch) | |
tree | 96983f12e1a21d6ad1b70724f4a1640991841924 /lib/CodeGen/PrologEpilogInserter.cpp | |
parent | b9329e01a44b0a9e4ff14695e0d6fb3ae028fd58 (diff) |
Added a MRegisterInfo hook that tells PEI the target is responsible for
rounding the stack frame to a multiple of stack alignment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33504 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/PrologEpilogInserter.cpp')
-rw-r--r-- | lib/CodeGen/PrologEpilogInserter.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/CodeGen/PrologEpilogInserter.cpp b/lib/CodeGen/PrologEpilogInserter.cpp index 915fbc252b..6c3e2d041c 100644 --- a/lib/CodeGen/PrologEpilogInserter.cpp +++ b/lib/CodeGen/PrologEpilogInserter.cpp @@ -389,11 +389,12 @@ void PEI::calculateFrameObjectOffsets(MachineFunction &Fn) { // Round up the size to a multiple of the alignment, but only if there are // calls or alloca's in the function. This ensures that any calls to // subroutines have their stack frames suitable aligned. - if (FFI->hasCalls() || FFI->hasVarSizedObjects()) { + const MRegisterInfo *RegInfo = Fn.getTarget().getRegisterInfo(); + if (!RegInfo->targetHandlesStackFrameRounding() && + (FFI->hasCalls() || FFI->hasVarSizedObjects())) { // When we have no frame pointer, we reserve argument space for call sites // in the function immediately on entry to the current function. This // eliminates the need for add/sub sp brackets around call sites. - const MRegisterInfo *RegInfo = Fn.getTarget().getRegisterInfo(); if (!RegInfo->hasFP(Fn)) Offset += FFI->getMaxCallFrameSize(); |