[PATCH] D82562: Implement AVX ABI Warning/error
Erich Keane via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 25 08:34:20 PDT 2020
erichkeane created this revision.
erichkeane added reviewers: craig.topper, echristo.
The x86-64 "avx" feature changes how >128 bit vector types are passed,
instead of being passed in separate 128 bit registers, they can be
passed in 256 bit registers.
"avx512f" does the same thing, except it switches from 256 bit registers
to 512 bit registers.
The result of both of these is an ABI incompatibility between functions
compiled with and without these features.
This patch implements a warning/error pair upon an attempt to call a
function that would run afoul of this. First, if a function is called
that would have its ABI changed, we issue a warning.
Second, if said call is made in a situation where the caller and callee
are known to have different calling conventions (such as the case of
'target'), we instead issue an error.
Repository:
rC Clang
https://reviews.llvm.org/D82562
Files:
clang/include/clang/Basic/DiagnosticFrontendKinds.td
clang/lib/CodeGen/CGCall.cpp
clang/lib/CodeGen/TargetInfo.cpp
clang/lib/CodeGen/TargetInfo.h
clang/test/CodeGen/target-avx-abi-diag.c
clang/test/CodeGen/target-builtin-error-3.c
clang/test/CodeGen/target-builtin-noerror.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82562.273370.patch
Type: text/x-patch
Size: 13233 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200625/b33fea06/attachment-0001.bin>
More information about the cfe-commits
mailing list