diff options
author | Jim Grosbach <grosbach@apple.com> | 2010-02-22 23:10:38 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2010-02-22 23:10:38 +0000 |
commit | 45fceea0e45b5440675b3c18d6d1d26eacf606e1 (patch) | |
tree | c84756f2785d34b69d86281bf9a9b89160116e29 /llvm/lib/CodeGen/PrologEpilogInserter.cpp | |
parent | d8abbf0af684c6a51bc982faeec29813c4b10802 (diff) | |
download | bcm5719-llvm-45fceea0e45b5440675b3c18d6d1d26eacf606e1.tar.gz bcm5719-llvm-45fceea0e45b5440675b3c18d6d1d26eacf606e1.zip |
Updated version of r96634 (which was reverted due to failing 176.gcc and
126.gcc nightly tests. These failures uncovered latent bugs that machine DCE
could remove one half of a stack adjust down/up pair, causing PEI to assert.
This update fixes that, and the tests now pass.
llvm-svn: 96822
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 040259e15c5..138e7110306 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); } } |