[PATCH] D82562: Implement AVX ABI Warning/error

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 3 12:30:22 PDT 2020


erichkeane added a comment.

In D82562#2191512 <https://reviews.llvm.org/D82562#2191512>, @dmajor wrote:

> @erichkeane, could you help me understand what is the action item of these warnings?
>
> In Firefox we don't require AVX so our compilations generally don't enable the feature. (A very small number of files do come with AVX versions, mostly in imported media codecs, but they are reasonably well-isolated from other code.) It's not clear to me what the warning wants me to do. I can't enable AVX across the board, and I can't change all the code that uses large types as parameters. I feel like the only thing to do is silence the warning since there are enough instances that people will complain about log spam. Have I misunderstood the situation?

With the warnings, yes, you can just disable them after you've made sure that you aren't compiling the functions with different settings. In the 'error' that this patch emits, it is that you have absolutely 'messed up'.

Basically:
If you try to call a function with a 256 bit type, and only 1 side uses 'avx' (either with 'target', multiversioning, or compiler flags), the ABI will not match.  THIS is a programming mistake.  If you're not making said programming mistake, suppressing the warning (with the suppression pragma) is your expected behavior.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D82562



More information about the cfe-commits mailing list