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

Jason Liu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 23 08:26:14 PDT 2019


jasonliu marked 2 inline comments as done.
jasonliu added inline comments.


================
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
----------------
sfertile wrote:
> 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?
getTargetMachine().Options.GuaranteedTailCallOpt could return true if -tailcallopt is passed in from the command line. 
I will put a report_fatal_error here to indicate unsupported tail calls for now. 


================
Comment at: llvm/test/CodeGen/PowerPC/test_call_aix.ll:11
+entry:
+; 32BIT: ADJCALLSTACKDOWN 56, 0, implicit-def dead $r1, implicit $r1
+; 32BIT: BL_NOP @foo, csr_aix32, implicit-def dead $lr, implicit $rm, implicit-def $r1
----------------
hubert.reinterpretcast wrote:
> Question: Where is the code that ensures quadword (16-byte) alignment of the stack?
I believe it's done in //PPCFrameLowering::determineFrameLayout//.


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