[PATCH] D41737: [PowerPC] Try to move the stack pointer update instruction later in the prologue and earlier in the epilogue

Stefan Pintilie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 5 06:28:22 PST 2018

stefanp added inline comments.

Comment at: lib/Target/PowerPC/PPCFrameLowering.cpp:832
+  if (FrameSize && !FI->hasFastCall() && !FI->usesPICBase() && !HasFP &&
+      !HasBP && isInt<16>(FrameSize)) {
+    const std::vector< CalleeSavedInfo > & info = MFI.getCalleeSavedInfo();
sfertile wrote:
> Can we use `!isLargeFrame` here instead of `isInt<16>(FrameSize) `?
No, they are not actually the same thing unfortunately. In the prologue we use this definition:
`bool isLargeFrame = !isInt<16>(NegFrameSize);`
In the epilogue we use this definition.
`bool isLargeFrame = !isInt<16>(FrameSize);`
But I need the two conditions to be identical in the two guards that I've set up. So, unfortunately, I can't use the isLargeFrame in the prologue. 


More information about the llvm-commits mailing list