[PATCH] D69101: [AIX] Refactor AIX Call Lowering to use CCState. NFCI.

Sean Fertile via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 21 07:02:13 PDT 2019


sfertile added inline comments.
Herald added a subscriber: wuzish.


================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:6729
+  default:
+    llvm_unreachable("Unexpected ValueType for argument!");
+  case MVT::i64:
----------------
`report_fatal_error` is more appropriate here. The default case isn't really unreachable.
Minor nit: `Unexpected` --> `Unhandled`.


================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:6783
+          CallConv == CallingConv::Cold ||
+          CallConv == CallingConv::Fast) && "Unknown calling convention!");
+
----------------
Minor nit: 'Unknown' --> `Unexpected`.


================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:6794
+  if (Subtarget.hasQPX())
+    report_fatal_error("QPX support is not supported on AIX.");
+  if (Subtarget.hasAltivec())
----------------
minor nit: `QPX is not supported on AIX`.


================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:6818
+  const unsigned MinParameterSaveAreaSize = 8 * PtrByteSize;
+  const unsigned NumBytes = LinkageSize + MinParameterSaveAreaSize;
 
----------------
You should be taking the max between `LinkageSize + MinParameterSaveAreaSize` and the stack size determined by the CCState object.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D69101





More information about the llvm-commits mailing list