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

Ulrich Weigand via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 28 09:59:59 PDT 2021


uweigand added a comment.

The SystemZ part now looks good to me, except for the point made inline.   It still would be good if the rest of the patch could be looked at by someone familiar with ARM.   (Maybe it would make sense to split the patch two parts?)



================
Comment at: llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp:708
+    return isVectorOrVectorPtrType(PTy->getElementType());
+  return false;
+}
----------------
This is missing some cases.  We need to catch any type that contains a vector type somewhere, which includes in particular aggregate types like array and structs, since the different alignment of the member may in turn trigger a different alignment of the aggregate.  E.g. a struct that contains a member of vector type should trigger the attribute.

We also possibly need to catch function pointer types where the pointed-to function has a vector (or derived) type as argument or return value.  (However, that may be overkill: it really only "counts" if such a type is *used* either to perform a call via function pointer, or else if the address of a local function is passed as pointer to some external user.   If this is too difficult to determine, then I guess it's OK to just count all function pointer types.)


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

https://reviews.llvm.org/D102894



More information about the llvm-commits mailing list