aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenFunction.h
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2021-12-15 17:04:01 +0100
committerNikita Popov <npopov@redhat.com>2021-12-27 09:36:21 +0100
commit7c3cf4c2c0689be1a08b8a1326703ec5770de471 (patch)
tree52147286faf9138b6507ef513b9381a12d946522 /clang/lib/CodeGen/CodeGenFunction.h
parentabc388ed3cf0ef7e617ebe243d3b0b32d29e69a5 (diff)
downloadllvm-7c3cf4c2c0689be1a08b8a1326703ec5770de471.zip
llvm-7c3cf4c2c0689be1a08b8a1326703ec5770de471.tar.gz
llvm-7c3cf4c2c0689be1a08b8a1326703ec5770de471.tar.bz2
[Inline][X86] Avoid inlining if it would create ABI-incompatible calls (PR52660)
X86 allows inlining functions if the callee target features are a subset of the caller target features. This ensures that we don't inline something into a caller that does not support it. However, this does not account for possible call ABI mismatches as a result of inlining. If a call passing a vector argument was originally in a -avx function, calling another -avx function, the vector is passed in xmm. If we now inline it into a +avx function, then it will be passed in ymm, even though the callee expects it in xmm. Fix this by scanning over all calls in the function and checking whether ABI incompatibility is possible. Calls that only pass scalar types are excluded, as I believe those always use the same ABI independent of target features. Fixes https://github.com/llvm/llvm-project/issues/52660. Differential Revision: https://reviews.llvm.org/D116036
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
0 files changed, 0 insertions, 0 deletions