[PATCH] D83276: [PowerPC] Generate CFI directives when probing in prologue

Jinsong Ji via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 10 12:28:08 PDT 2020


jsji accepted this revision as: jsji.
jsji added a comment.
This revision is now accepted and ready to land.

LGTM.



================
Comment at: llvm/lib/Target/PowerPC/PPCFrameLowering.cpp:1375
+  const MCRegisterInfo *MRI = MMI.getContext().getRegisterInfo();
+  const bool needsCFI = MF.needsFrameMoves() && !Subtarget.isAIXABI();
   auto StackAllocMIPos = llvm::find_if(PrologMBB, [](MachineInstr &MI) {
----------------
Can we add comments here about excluding `AIX`.


================
Comment at: llvm/lib/Target/PowerPC/PPCFrameLowering.cpp:1451
+    buildDefCFAReg(PrologMBB, {MI}, FPReg);
+    buildCFAOffset(PrologMBB, {MI}, 0);
+  }
----------------
We should merge this two CFIs into one.


================
Comment at: llvm/test/CodeGen/PowerPC/stack-clash-prologue.ll:59
+; CHECK-LE-NEXT:    .cfi_def_cfa_register r1
+; CHECK-LE-NEXT:    .cfi_def_cfa_offset 4144
 ; CHECK-LE-NEXT:    li r3, 3
----------------
These CFIs are not generated in this patch, it would be better if we can pre-commit the testcase changed due to removing of `nounwind` attr first, so that we can see the real changes.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D83276/new/

https://reviews.llvm.org/D83276





More information about the llvm-commits mailing list