diff options
author | Jim Grosbach <grosbach@apple.com> | 2010-02-19 00:16:24 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2010-02-19 00:16:24 +0000 |
commit | aa34003f6f9c89baa8f9c3149e409ceefdbe3833 (patch) | |
tree | 02d25514b42d85de49307988f4b7f8cca96aa453 /llvm/lib/CodeGen/PrologEpilogInserter.cpp | |
parent | 2446f575031e4fcf6086979af6f9fd8d5467b621 (diff) | |
download | llvm-aa34003f6f9c89baa8f9c3149e409ceefdbe3833.zip llvm-aa34003f6f9c89baa8f9c3149e409ceefdbe3833.tar.gz llvm-aa34003f6f9c89baa8f9c3149e409ceefdbe3833.tar.bz2 |
Radar 7636153. In the presence of large call frames, it's not sufficient
for ARM to just check if a function has a FP to determine if it's safe
to simplify the stack adjustment pseudo ops prior to eliminating frame
indices. Allow targets to override the default behavior and does so for ARM
and Thumb2.
llvm-svn: 96634
Diffstat (limited to 'llvm/lib/CodeGen/PrologEpilogInserter.cpp')
-rw-r--r-- | llvm/lib/CodeGen/PrologEpilogInserter.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/PrologEpilogInserter.cpp b/llvm/lib/CodeGen/PrologEpilogInserter.cpp index 040259e..138e711 100644 --- a/llvm/lib/CodeGen/PrologEpilogInserter.cpp +++ b/llvm/lib/CodeGen/PrologEpilogInserter.cpp @@ -175,9 +175,10 @@ void PEI::calculateCallsInformation(MachineFunction &Fn) { MachineBasicBlock::iterator I = *i; // If call frames are not being included as part of the stack frame, and - // there is no dynamic allocation (therefore referencing frame slots off - // sp), leave the pseudo ops alone. We'll eliminate them later. - if (RegInfo->hasReservedCallFrame(Fn) || RegInfo->hasFP(Fn)) + // the target doesn't indicate otherwise, remove the call frame pseudos + // here. The sub/add sp instruction pairs are still inserted, but we don't + // need to track the SP adjustment for frame index elimination. + if (RegInfo->canSimplifyCallFramePseudos(Fn)) RegInfo->eliminateCallFramePseudoInstr(Fn, *I->getParent(), I); } } |