[PATCH] D11817: Enable Shrink Wrapping for PPC64.
NAKAMURA Takumi via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 11 01:30:38 PDT 2015
chapuni added inline comments.
================
Comment at: lib/Target/PowerPC/PPCFrameLowering.cpp:1002
@@ -1011,20 +1001,3 @@
- bool UsesTCRet = RetOpcode == PPC::TCRETURNri ||
- RetOpcode == PPC::TCRETURNdi ||
- RetOpcode == PPC::TCRETURNai ||
- RetOpcode == PPC::TCRETURNri8 ||
- RetOpcode == PPC::TCRETURNdi8 ||
- RetOpcode == PPC::TCRETURNai8;
-
- if (UsesTCRet) {
- int MaxTCRetDelta = FI->getTailCallSPDelta();
- MachineOperand &StackAdjust = MBBI->getOperand(1);
- assert(StackAdjust.isImm() && "Expecting immediate value.");
- // Adjust stack pointer.
- int StackAdj = StackAdjust.getImm();
- int Delta = StackAdj - MaxTCRetDelta;
- assert((Delta >= 0) && "Delta must be positive");
- if (MaxTCRetDelta>0)
- FrameSize += (StackAdj +Delta);
- else
- FrameSize += StackAdj;
+ bool IsReturnBlock = MBBI->isReturn();
+
----------------
It is unsafe if MBBI points end iterator.
Tweaked in r247395. Please reconfirm.
http://reviews.llvm.org/D11817
More information about the llvm-commits
mailing list