llvm.org GIT mirror llvm / 7588ad4
Don't want to add FramePtr to callee save spill list twice. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33727 91177308-0d34-0410-b5e6-96231b3b80d8 Evan Cheng 13 years ago
1 changed file(s) with 2 addition(s) and 8 deletion(s). Raw diff Collapse all Expand all
880880 }
881881 }
882882
883 if (hasFP(MF)) {
884 MF.changePhyRegUsed(FramePtr, true);
885 NumGPRSpills++;
886 CanEliminateFrame = false;
887 }
888
889 if (!CanEliminateFrame) {
883 if (!CanEliminateFrame || hasFP(MF)) {
890884 AFI->setHasStackFrame(true);
891885
892886 // If LR is not spilled, but at least one of R4, R5, R6, and R7 is spilled.
901895
902896 // Darwin ABI requires FP to point to the stack slot that contains the
903897 // previous FP.
904 if (STI.isTargetDarwin()) {
898 if (STI.isTargetDarwin() || hasFP(MF)) {
905899 MF.changePhyRegUsed(FramePtr, true);
906900 NumGPRSpills++;
907901 }