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

Jonas Paulsson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 9 03:51:30 PDT 2021


jonpa updated this revision to Diff 371542.
jonpa added a comment.

Updated per review to use a module flag instead of function attribute.

No other function changes, but some thoughts:

Not sure if SystemZMachineFunctionInfo.h is the right place for isVectorTypeBased()... It could simply be local to SystemZAsmPrinter.cpp if we scanned for all call instructions there instead of checking them in SystemZISelLowering::LowerCall(). I would feel just slightly more comfortable with that rather than relying on the presence of CLI.CB in detectVisibleVectorABI(), although I guess that should be ok... It might also be slightly more readable to not handle the call sites in a different place, but rather do all the back-end checking in AsmPrinter.

hasVisibleVectorABI() checks varargs also when calling a local function (see comment there). It would have been nice to instead identify va_list in isVectorTypeBased(), but I don't think that's possible. Another way might be to check in the front-end when a va_list is passed to a global function... Not sure how much it matters - I think GCC is being overconservative here.


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

https://reviews.llvm.org/D105067

Files:
  clang/lib/CodeGen/TargetInfo.cpp
  clang/test/CodeGen/SystemZ/systemz-abi-vector2.c
  llvm/lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp
  llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp
  llvm/lib/Target/SystemZ/SystemZAsmPrinter.h
  llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
  llvm/lib/Target/SystemZ/SystemZMachineFunctionInfo.h
  llvm/test/CodeGen/SystemZ/vec-abi-gnuattr-00.ll
  llvm/test/CodeGen/SystemZ/vec-abi-gnuattr-01.ll
  llvm/test/CodeGen/SystemZ/vec-abi-gnuattr-02.ll
  llvm/test/CodeGen/SystemZ/vec-abi-gnuattr-03.ll
  llvm/test/CodeGen/SystemZ/vec-abi-gnuattr-04.ll
  llvm/test/CodeGen/SystemZ/vec-abi-gnuattr-05.ll
  llvm/test/CodeGen/SystemZ/vec-abi-gnuattr-06.ll
  llvm/test/CodeGen/SystemZ/vec-abi-gnuattr-07.ll
  llvm/test/CodeGen/SystemZ/vec-abi-gnuattr-08.ll
  llvm/test/CodeGen/SystemZ/vec-abi-gnuattr-09.ll
  llvm/test/CodeGen/SystemZ/vec-abi-gnuattr-10.ll
  llvm/test/CodeGen/SystemZ/vec-abi-gnuattr-11.ll
  llvm/test/CodeGen/SystemZ/vec-abi-gnuattr-12.ll
  llvm/test/CodeGen/SystemZ/vec-abi-gnuattr-13.ll
  llvm/test/CodeGen/SystemZ/vec-abi-gnuattr-14.ll
  llvm/test/CodeGen/SystemZ/vec-abi-gnuattr-15.ll
  llvm/test/CodeGen/SystemZ/vec-abi-gnuattr-16.ll
  llvm/test/MC/SystemZ/gnu-attributes.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105067.371542.patch
Type: text/x-patch
Size: 20833 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210909/b9666173/attachment.bin>


More information about the llvm-commits mailing list