[PATCH] D105067: [SystemZ] Emit .gnu_attribute for an externally visible vector abi.

Ulrich Weigand via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 29 13:45:22 PDT 2021


uweigand added inline comments.


================
Comment at: llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp:739
+      if (const Function *F = dyn_cast<Function>(&GV)) {
+        FunctionType *FTy = F->getFunctionType();
+        if (isVectorTypeBased(FTy->getReturnType(), VisitedTypes))
----------------
Now that isVectorTypeBased supports function types, I think the code below can be replaced by a single call to isVectorTypeBased(FTy).


================
Comment at: llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp:749
+        }
+        if (!HasVectorABI && FTy->isVarArg()) {
+          for (auto U : F->users()) {
----------------
I don't think this implementation of vararg support is quite complete.  On the caller side, you check for variable arguments to any direct function with a prototype.  However, this misses the case where an *indirect* function call (using a function pointer) has variable arguments.

This also completely misses the *callee* side: every function that takes variable arguments and uses va_arg with a vector type is also dependent on the vector ABI.



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

https://reviews.llvm.org/D105067



More information about the llvm-commits mailing list