[PATCH] D61948: Implement call lowering without parameters on AIX

Sean Fertile via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 21 18:06:29 PDT 2019


sfertile added inline comments.


================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:6612
+  // These operations are automatically eliminated by the prolog/epilog
+  // inserter pass
+  Chain = DAG.getCALLSEQ_START(Chain, NumBytes, 0, dl);
----------------
minor nit: missing period.


================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:6616
+
+  if (!isTailCall &&
+      !isFunctionGlobalAddress(Callee) &&
----------------
We don't need `!isTailCall` in the condition here.


================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:6624
+  
+  // TODO: when tail call is supported, use CalculateTailCallSPDiff() 
+  // to calculate by how many bytes the stack has to be adjusted in case
----------------
With this patch AIX is using `IsEligibleForTailCallOptimization` to determine if a call can be a tail-call.  Is this safe because we expect `getTargetMachine().Options.GuaranteedTailCallOpt` to be false on AIX ? If thats the case then we should assert that here.  Or should we have an llvm_unreachable here for unsupported tail-calls for now?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D61948





More information about the llvm-commits mailing list