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

Hal Finkel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 6 18:10:32 PST 2018


hfinkel added inline comments.


================
Comment at: lib/Target/PowerPC/PPCFrameLowering.cpp:830
+  MachineBasicBlock::iterator StackUpdateLoc = MBBI;
+  bool movingStackUpdateDown = false;
+  if (FrameSize && !FI->hasFastCall() && !FI->usesPICBase() && !HasFP &&
----------------
movingStackUpdateDown -> MovingStackUpdateDown


================
Comment at: lib/Target/PowerPC/PPCFrameLowering.cpp:831
+  bool movingStackUpdateDown = false;
+  if (FrameSize && !FI->hasFastCall() && !FI->usesPICBase() && !HasFP &&
+      !HasBP && isInt<16>(FrameSize)) {
----------------
Please explain in the comment above why these particular things are the validity condition for this optimization.


================
Comment at: lib/Target/PowerPC/PPCFrameLowering.cpp:1368
+  MachineBasicBlock::iterator StackUpdateLoc = MBBI;
+  bool movingStackUpdateUp = false;
+  if (FrameSize && !FI->hasFastCall() && !FI->usesPICBase() && !HasFP &&
----------------
movingStackUpdateUp -> MovingStackUpdateUp


https://reviews.llvm.org/D41737





More information about the llvm-commits mailing list