wpcwzy wrote:
Hi Alexey,
Thanks, I've changed it as you suggested.
The mappings are now added to the call site instead of the declaration,
filtered by the features of the caller function, so a function with
target("avx2") gets the AVX2 variants and the base target only the SSE ones.
This also drops the isWrittenInMainFile check, so the .i file case and the LTO
attribute merging problem are gone. Only the most capable ISA class is kept for
a given vector shape, so the mapping list does not depend on the order anymore
(with AVX2 we list bN2 and dN4, not cN4). Variant declarations are still added
to llvm.compiler.used, with a small set to not add the same declaration twice.
I added your declare_simd_math_target.c test, and the header test now also
checks that the AVX variant is dropped when AVX2 is available.
The SimplifyLibCalls guard from the previous round is unchanged. check-all and
llvm-test-suite pass.
Could you take another look? Thanks!
https://github.com/llvm/llvm-project/pull/193881
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits