This is an archive of the discontinued LLVM Phabricator instance.

[darwin] Disable the -Wpsabi warning
Needs ReviewPublic

Authored by arphaman on Aug 17 2020, 1:26 PM.

Details

Summary

The Darwin targets don't enable AVX/AVX512 by default to support Rosetta 2, so the new -Wpsabi warning adds unwanted noise to our SDK. Users who build for AVX/AVX512 for Darwin are already supposed to take extra care when it comes to the ABI differences and the SDK.

Diff Detail

Event Timeline

arphaman created this revision.Aug 17 2020, 1:26 PM
arphaman requested review of this revision.Aug 17 2020, 1:26 PM
arphaman updated this revision to Diff 286181.Aug 17 2020, 5:39 PM

add missing test fix

ab added a comment.Sep 1 2020, 4:15 PM

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

clang/lib/CodeGen/TargetInfo.cpp
2515–2516

I wouldn't explain it this way, maybe something like ^ ?

2564–2568

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

arphaman updated this revision to Diff 302977.Nov 4 2020, 2:57 PM

Address Ahmed's comments.

arphaman marked 2 inline comments as done.Nov 4 2020, 3:01 PM
arphaman added inline comments.
clang/lib/CodeGen/TargetInfo.cpp
2564–2568

This didn't really fit well here as there's also a second invocation of checkAVXParam for the return type, which would need a second check for whether the warning is enabled or not, so I moved your suggestion into checkAVXParam itself.