[PATCH] D86105: [darwin] Disable the -Wpsabi warning

Ahmed Bougacha via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 1 16:15:39 PDT 2020


ab added a comment.

Hmm, is there a more general way to disable warnings?  I'm not familiar with these parts, so I'll defer to you folks =]



================
Comment at: clang/lib/CodeGen/TargetInfo.cpp:2515-2516
+  if (!CallerHasFeat && !CalleeHasFeat) {
+    // Darwin doesn't enable AVX/AVX512 by default to support Rosetta 2, so it's
+    // user's responsibility to use AVX/AVX512 safely.
+    if (TT.isOSDarwin())
----------------
I wouldn't explain it this way, maybe something like ^ ?


================
Comment at: clang/lib/CodeGen/TargetInfo.cpp:2561-2565
     // The "avx" feature changes how vectors >128 in size are passed. "avx512f"
     // additionally changes how vectors >256 in size are passed. Like GCC, we
     // warn when a function is called with an argument where this will change.
     // Unlike GCC, we also error when it is an obvious ABI mismatch, that is,
     // the caller and callee features are mismatched.
----------------
also very minor nitpick: if you pass around some WarnOnSSE bool or something, you'd have the darwin explanation with this psABI comment here, might be nicer


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

https://reviews.llvm.org/D86105



More information about the cfe-commits mailing list