[clang] [AArch64][FMV] Enable PAuth and BTI hardening of resolver functions (PR #141573)

2025-06-03 Thread Alexandros Lamprineas via cfe-commits
labrinea wrote: Seems somewhat related to https://github.com/llvm/llvm-project/pull/84704. @jroelofs mind taking a look? https://github.com/llvm/llvm-project/pull/141573 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[clang] [Clang][FMV] Stop emitting implicit default version using target_clones. (PR #141808)

2025-06-02 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea closed https://github.com/llvm/llvm-project/pull/141808 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][FMV] Stop emitting implicit default version using target_clones. (PR #141808)

2025-05-28 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea edited https://github.com/llvm/llvm-project/pull/141808 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][FMV][AArch64] Tidy up codegen tests. (PR #132273)

2025-04-04 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea created https://github.com/llvm/llvm-project/pull/132273 Removes attr-target-version.c which doesn't have a clear purpose. Introduces AArch64/fmv-detection.c to check detection bitmasks. Adds coverage in AArch64/fmv-resolver-emission.c >From d5f250d42f908ecae74b474

[clang] [compiler-rt] [llvm] [FMV][AArch64] Add feature CSSC and detect on linux platform. (PR #132727)

2025-03-26 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea closed https://github.com/llvm/llvm-project/pull/132727 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [FMV][AArch64] Add feature CSSC and detect on linux platform. (PR #132727)

2025-03-26 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea updated https://github.com/llvm/llvm-project/pull/132727 >From b61d23aa9950d24ca88780fbcc08935447e987fd Mon Sep 17 00:00:00 2001 From: Alexandros Lamprineas Date: Mon, 24 Mar 2025 12:15:58 + Subject: [PATCH] [FMV][AArch64] Add feature CSSC and detect on linux pla

[clang] [compiler-rt] [llvm] [FMV][AArch64] Add feature CSSC and detect on linux platform. (PR #132727)

2025-03-25 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea updated https://github.com/llvm/llvm-project/pull/132727 >From b61d23aa9950d24ca88780fbcc08935447e987fd Mon Sep 17 00:00:00 2001 From: Alexandros Lamprineas Date: Mon, 24 Mar 2025 12:15:58 + Subject: [PATCH] [FMV][AArch64] Add feature CSSC and detect on linux pla

[clang] [compiler-rt] [llvm] [FMV][AArch64] Add feature CSSC and detect on linux platform. (PR #132727)

2025-03-25 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea updated https://github.com/llvm/llvm-project/pull/132727 >From b61d23aa9950d24ca88780fbcc08935447e987fd Mon Sep 17 00:00:00 2001 From: Alexandros Lamprineas Date: Mon, 24 Mar 2025 12:15:58 + Subject: [PATCH] [FMV][AArch64] Add feature CSSC and detect on linux pla

[clang] [compiler-rt] [llvm] [FMV][AArch64] Add feature CSSC and detect on linux platform. (PR #132727)

2025-03-25 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea updated https://github.com/llvm/llvm-project/pull/132727 >From b61d23aa9950d24ca88780fbcc08935447e987fd Mon Sep 17 00:00:00 2001 From: Alexandros Lamprineas Date: Mon, 24 Mar 2025 12:15:58 + Subject: [PATCH] [FMV][AArch64] Add feature CSSC and detect on linux pla

[clang] [compiler-rt] [llvm] [FMV][AArch64] Add feature CSSC and detect on linux platform. (PR #132727)

2025-03-25 Thread Alexandros Lamprineas via cfe-commits
labrinea wrote: Alright, Wilco has confirmed that GCC will reuse the same detection bit. Any other remarks or are we happy with this change? https://github.com/llvm/llvm-project/pull/132727 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https

[clang] [NFC][FMV][AArch64] Tidy up codegen tests. (PR #132273)

2025-03-25 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea edited https://github.com/llvm/llvm-project/pull/132273 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [FMV][AArch64] Add feature CSSC and detect on linux platform. (PR #132727)

2025-03-24 Thread Alexandros Lamprineas via cfe-commits
labrinea wrote: > The place to look for feature tests on Apple platforms is here: > https://github.com/apple-oss-distributions/xnu/blob/main/osfmk/arm/cpu_capabilities_public.h. I am not seeing a capability bit for this feature. Does this mean it cannot be supported yet? https://github.com/ll

[clang] [compiler-rt] [llvm] [FMV][AArch64] Add feature CSSC and detect on linux platform. (PR #132727)

2025-03-24 Thread Alexandros Lamprineas via cfe-commits
@@ -33,7 +33,7 @@ enum CPUFeatures { FEAT_FP, FEAT_SIMD, FEAT_CRC, - RESERVED_FEAT_SHA1, // previously used and now ABI legacy + FEAT_CSSC, labrinea wrote: Yeap, we only need to make sure GNU is doing the same cc @Wilco1 https://github.com/llvm/llvm-p

[clang] [compiler-rt] [llvm] [FMV][AArch64] Add feature CSSC and detect on linux platform. (PR #132727)

2025-03-24 Thread Alexandros Lamprineas via cfe-commits
labrinea wrote: Hi @jroelofs @DanielKristofKiss. I am not sure how to detect on other platforms. Suggestions for apple and windows welcome. https://github.com/llvm/llvm-project/pull/132727 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:

[clang] [compiler-rt] [llvm] [FMV][AArch64] Add feature CSSC and detect on linux platform. (PR #132727)

2025-03-24 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea edited https://github.com/llvm/llvm-project/pull/132727 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [FMV][AArch64] Add feature CSSC and detect on linux platform. (PR #132727)

2025-03-24 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea created https://github.com/llvm/llvm-project/pull/132727 Also removes priority bits for unused features predres and ls64. >From b61d23aa9950d24ca88780fbcc08935447e987fd Mon Sep 17 00:00:00 2001 From: Alexandros Lamprineas Date: Mon, 24 Mar 2025 12:15:58 + Subjec

[clang] [NFC][FMV][AArch64] Tidy up codegen tests. (PR #132273)

2025-03-24 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea closed https://github.com/llvm/llvm-project/pull/132273 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][FMV][AArch64] Tidy up codegen tests. (PR #132273)

2025-03-24 Thread Alexandros Lamprineas via cfe-commits
labrinea wrote: Cool, thanks Tomas https://github.com/llvm/llvm-project/pull/132273 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][FMV][AArch64] Tidy up codegen tests. (PR #132273)

2025-03-21 Thread Alexandros Lamprineas via cfe-commits
@@ -1,1145 +0,0 @@ -// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals --include-generated-funcs --global-value-regex ".*" -// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -emit-llvm -

[clang] [NFC][FMV][AArch64] Tidy up codegen tests. (PR #132273)

2025-03-21 Thread Alexandros Lamprineas via cfe-commits
@@ -1,1145 +0,0 @@ -// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals --include-generated-funcs --global-value-regex ".*" -// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -emit-llvm -

[clang] [NFC][FMV][AArch64] Tidy up codegen tests. (PR #132273)

2025-03-21 Thread Alexandros Lamprineas via cfe-commits
@@ -0,0 +1,790 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals --include-generated-funcs --global-value-regex ".*" + +// Test all of the AArch64 feature detection bitmasks in the

[clang] [NFC][FMV][AArch64] Tidy up codegen tests. (PR #132273)

2025-03-21 Thread Alexandros Lamprineas via cfe-commits
@@ -0,0 +1,790 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals --include-generated-funcs --global-value-regex ".*" + +// Test all of the AArch64 feature detection bitmasks in the

[clang] [NFC][FMV][AArch64] Tidy up codegen tests. (PR #132273)

2025-03-21 Thread Alexandros Lamprineas via cfe-commits
@@ -0,0 +1,790 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals --include-generated-funcs --global-value-regex ".*" + +// Test all of the AArch64 feature detection bitmasks in the

[clang] [NFC][FMV][AArch64] Tidy up codegen tests. (PR #132273)

2025-03-21 Thread Alexandros Lamprineas via cfe-commits
@@ -1,1145 +0,0 @@ -// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals --include-generated-funcs --global-value-regex ".*" -// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -emit-llvm -

[clang] [clang][Sema][FMV] Add a note to the 'cannot become multiversioned' diagnostic (PR #124364)

2025-01-27 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/124364 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [FMV][AArch64] Remove features predres and ls64. (PR #124266)

2025-01-24 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea closed https://github.com/llvm/llvm-project/pull/124266 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [FMV][AArch64] Remove features predres and ls64. (PR #124266)

2025-01-24 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea created https://github.com/llvm/llvm-project/pull/124266 These cannot be detected by reading the ID_AA64ISAR1_EL1 register since their corresponding bitfields are hidden. Additionally the instructions that these features enable are unusable from EL0. ACLE: https://

[clang] [NFC] Remove invalid features from test and autogenerate checks. (PR #124130)

2025-01-23 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea closed https://github.com/llvm/llvm-project/pull/124130 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] Remove invalid features from test and autogenerate checks. (PR #124130)

2025-01-23 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea updated https://github.com/llvm/llvm-project/pull/124130 >From 1611549295c5f6964839200b828243d0a33d1a37 Mon Sep 17 00:00:00 2001 From: Alexandros Lamprineas Date: Thu, 23 Jan 2025 15:00:52 + Subject: [PATCH 1/2] [NFC] Remove invalid features from test and autogen

[clang] [NFC] Remove invalid features from test and autogenerate checks. (PR #124130)

2025-01-23 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea created https://github.com/llvm/llvm-project/pull/124130 None >From 1611549295c5f6964839200b828243d0a33d1a37 Mon Sep 17 00:00:00 2001 From: Alexandros Lamprineas Date: Thu, 23 Jan 2025 15:00:52 + Subject: [PATCH] [NFC] Remove invalid features from test and autog

[clang] [FMV][AArch64][clang] Advance __FUNCTION_MULTI_VERSIONING_SUPPORT_LEVEL to ACLE Q3 (PR #123056)

2025-01-16 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea closed https://github.com/llvm/llvm-project/pull/123056 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [FMV][AArch64][clang] Advance __FUNCTION_MULTI_VERSIONING_SUPPORT_LEVEL to ACLE Q3 (PR #123056)

2025-01-15 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea created https://github.com/llvm/llvm-project/pull/123056 None >From e113c583644afb7a042e73d3ccd697d9dd0b4dd8 Mon Sep 17 00:00:00 2001 From: Alexandros Lamprineas Date: Wed, 15 Jan 2025 13:35:37 + Subject: [PATCH] [FMV][AArch64][clang] Advance __FUNCTION_MULTI_V

[clang] [FMV][AArch64] Changes in fmv-features metadata. (PR #122192)

2025-01-10 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea closed https://github.com/llvm/llvm-project/pull/122192 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [FMV][AArch64] Changes in fmv-features metadata. (PR #122192)

2025-01-10 Thread Alexandros Lamprineas via cfe-commits
labrinea wrote: Thanks! https://github.com/llvm/llvm-project/pull/122192 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [FMV][AArch64] Changes in fmv-features metadata. (PR #122192)

2025-01-10 Thread Alexandros Lamprineas via cfe-commits
@@ -2763,9 +2764,10 @@ bool CodeGenModule::GetCPUAndFeaturesAttributes(GlobalDecl GD, Attrs.addAttribute("fmv-features"); AddedAttr = true; } else if (!Feats.empty()) { - llvm::sort(Feats); + // Sort features and remove duplicates. + std::set Ord

[clang] [FMV][AArch64] Changes in fmv-features metadata. (PR #122192)

2025-01-10 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea updated https://github.com/llvm/llvm-project/pull/122192 >From a93614ed2f7038f0c1da6b70db989006b3434d4c Mon Sep 17 00:00:00 2001 From: Alexandros Lamprineas Date: Wed, 8 Jan 2025 23:14:09 + Subject: [PATCH 1/2] [FMV][AArch64] Changes in fmv-features metadata. *

[clang] [FMV][AArch64] Changes in fmv-features metadata. (PR #122192)

2025-01-08 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea created https://github.com/llvm/llvm-project/pull/122192 * We want the default version to have this attribute too otherwise it becomes indistinguishable from non-versioned functions. * We don't need the '+' unlike target-features which can negate. This will allow u

[clang] [llvm] [FMV][AArch64] Simplify version selection according to ACLE. (PR #121921)

2025-01-08 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea closed https://github.com/llvm/llvm-project/pull/121921 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [FMV][AArch64] Simplify version selection according to ACLE. (PR #121921)

2025-01-08 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea updated https://github.com/llvm/llvm-project/pull/121921 >From 785c6eca701edbd42686a4adaa2099b55b5271a0 Mon Sep 17 00:00:00 2001 From: Alexandros Lamprineas Date: Tue, 7 Jan 2025 11:37:32 + Subject: [PATCH 1/5] [FMV][AArch64] Simplify version selection according

[clang] [llvm] [FMV][AArch64] Simplify version selection according to ACLE. (PR #121921)

2025-01-08 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea updated https://github.com/llvm/llvm-project/pull/121921 >From 785c6eca701edbd42686a4adaa2099b55b5271a0 Mon Sep 17 00:00:00 2001 From: Alexandros Lamprineas Date: Tue, 7 Jan 2025 11:37:32 + Subject: [PATCH 1/5] [FMV][AArch64] Simplify version selection according

[clang] [llvm] [FMV][AArch64] Simplify version selection according to ACLE. (PR #121921)

2025-01-08 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea updated https://github.com/llvm/llvm-project/pull/121921 >From 785c6eca701edbd42686a4adaa2099b55b5271a0 Mon Sep 17 00:00:00 2001 From: Alexandros Lamprineas Date: Tue, 7 Jan 2025 11:37:32 + Subject: [PATCH 1/4] [FMV][AArch64] Simplify version selection according

[clang] [llvm] [FMV][AArch64] Simplify version selection according to ACLE. (PR #121921)

2025-01-08 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea updated https://github.com/llvm/llvm-project/pull/121921 >From 785c6eca701edbd42686a4adaa2099b55b5271a0 Mon Sep 17 00:00:00 2001 From: Alexandros Lamprineas Date: Tue, 7 Jan 2025 11:37:32 + Subject: [PATCH 1/3] [FMV][AArch64] Simplify version selection according

[clang] [llvm] [FMV][AArch64] Simplify version selection according to ACLE. (PR #121921)

2025-01-07 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea updated https://github.com/llvm/llvm-project/pull/121921 >From 785c6eca701edbd42686a4adaa2099b55b5271a0 Mon Sep 17 00:00:00 2001 From: Alexandros Lamprineas Date: Tue, 7 Jan 2025 11:37:32 + Subject: [PATCH 1/2] [FMV][AArch64] Simplify version selection according

[clang] [llvm] [FMV][AArch64] Simplify version selection according to ACLE. (PR #121921)

2025-01-07 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea updated https://github.com/llvm/llvm-project/pull/121921 >From 785c6eca701edbd42686a4adaa2099b55b5271a0 Mon Sep 17 00:00:00 2001 From: Alexandros Lamprineas Date: Tue, 7 Jan 2025 11:37:32 + Subject: [PATCH 1/2] [FMV][AArch64] Simplify version selection according

[clang] [llvm] [FMV][AArch64] Simplify version selection according to ACLE. (PR #121921)

2025-01-07 Thread Alexandros Lamprineas via cfe-commits
@@ -49,16 +49,11 @@ std::optional AArch64::ArchInfo::findBySubArch(StringRef SubA } unsigned AArch64::getFMVPriority(ArrayRef Features) { labrinea wrote: Ah I see what you mean, we should first compare the highest priority feature between the two sets. In t

[clang] [llvm] [FMV][AArch64] Simplify version selection according to ACLE. (PR #121921)

2025-01-07 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea created https://github.com/llvm/llvm-project/pull/121921 Currently, the more features a version has, the higher its priority is. We are changing ACLE https://github.com/ARM-software/acle/pull/370 as follows: "Among any two versions, the higher priority version is de

[clang] [FMV][AArch64][clang] Emit fmv-features metadata in LLVM IR. (PR #118544)

2025-01-07 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea closed https://github.com/llvm/llvm-project/pull/118544 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [FMV][AArch64][clang] Emit fmv-features metadata in LLVM IR. (PR #118544)

2025-01-06 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea updated https://github.com/llvm/llvm-project/pull/118544 >From e028f19f1b4154e44c61e371ae5feeb522085338 Mon Sep 17 00:00:00 2001 From: Alexandros Lamprineas Date: Tue, 3 Dec 2024 20:22:37 + Subject: [PATCH 1/2] [FMV][AArch64][clang] Emit fmv-features metadata in

[clang] [FMV][AArch64] Emit mangled default version if explicitly specified. (PR #120022)

2024-12-19 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea closed https://github.com/llvm/llvm-project/pull/120022 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [FMV][AArch64] Emit mangled default version if explicitly specified. (PR #120022)

2024-12-19 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea updated https://github.com/llvm/llvm-project/pull/120022 >From f3997c43e57265444bade9372833a9235e3426cb Mon Sep 17 00:00:00 2001 From: Alexandros Lamprineas Date: Fri, 13 Dec 2024 12:42:31 + Subject: [PATCH 1/2] [FMV][AArch64] Emit mangled default version if expl

[clang] [FMV][AArch64] Emit mangled default version if explicitly specified. (PR #120022)

2024-12-18 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea updated https://github.com/llvm/llvm-project/pull/120022 >From f3997c43e57265444bade9372833a9235e3426cb Mon Sep 17 00:00:00 2001 From: Alexandros Lamprineas Date: Fri, 13 Dec 2024 12:42:31 + Subject: [PATCH 1/2] [FMV][AArch64] Emit mangled default version if expl

[clang] [FMV][AArch64] Emit mangled default version if explicitly specified. (PR #120022)

2024-12-18 Thread Alexandros Lamprineas via cfe-commits
labrinea wrote: Thanks! https://github.com/llvm/llvm-project/pull/120022 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [FMV][AArch64] Emit mangled default version if explicitly specified. (PR #120022)

2024-12-18 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea updated https://github.com/llvm/llvm-project/pull/120022 >From f3997c43e57265444bade9372833a9235e3426cb Mon Sep 17 00:00:00 2001 From: Alexandros Lamprineas Date: Fri, 13 Dec 2024 12:42:31 + Subject: [PATCH 1/2] [FMV][AArch64] Emit mangled default version if expl

[clang] [FMV][AArch64][clang] Emit fmv-features metadata in LLVM IR. (PR #118544)

2024-12-18 Thread Alexandros Lamprineas via cfe-commits
labrinea wrote: Just a gentle reminder that I would like us to clarify the impact of the cmdline over the version selection algorithm if any. With the Christmas break approaching I fear https://github.com/llvm/llvm-project/pull/87939 may miss the LLVM20 branch date. https://github.com/llvm/ll

[clang] [FMV][AArch64] Emit mangled default version if explicitly specified. (PR #120022)

2024-12-15 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea edited https://github.com/llvm/llvm-project/pull/120022 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [FMV][AArch64] Emit mangled default version if explicitly specified. (PR #120022)

2024-12-15 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea created https://github.com/llvm/llvm-project/pull/120022 Curently we need at least one more version other than the default to trigger FMV. However we would like a header file declaration __attribute__((target_version("default"))) void f(void); to guarantee that the

[clang] [llvm] [AArch64][FMV] Add missing feature dependencies and detect at runtime. (PR #119231)

2024-12-11 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea closed https://github.com/llvm/llvm-project/pull/119231 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64][FMV] Add missing feature dependencies and detect at runtime. (PR #119231)

2024-12-11 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea updated https://github.com/llvm/llvm-project/pull/119231 >From f6f2fd6aac09a0f2c14545e1fbda9aec7eb2ed46 Mon Sep 17 00:00:00 2001 From: Alexandros Lamprineas Date: Mon, 9 Dec 2024 13:00:58 + Subject: [PATCH 1/2] [AArch64][FMV] Add missing feature dependencies and

[clang] [llvm] [AArch64][FMV] Add missing feature dependencies and detect at runtime. (PR #119231)

2024-12-11 Thread Alexandros Lamprineas via cfe-commits
labrinea wrote: @sdesmalen-arm thanks for reviewing. I have addressed your comments. Do the llvm tests look okay? https://github.com/llvm/llvm-project/pull/119231 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[clang] [llvm] [AArch64][FMV] Add missing feature dependencies and detect at runtime. (PR #119231)

2024-12-11 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea updated https://github.com/llvm/llvm-project/pull/119231 >From f6f2fd6aac09a0f2c14545e1fbda9aec7eb2ed46 Mon Sep 17 00:00:00 2001 From: Alexandros Lamprineas Date: Mon, 9 Dec 2024 13:00:58 + Subject: [PATCH 1/2] [AArch64][FMV] Add missing feature dependencies and

[clang] [llvm] [AArch64][FMV] Add missing feature dependencies and detect at runtime. (PR #119231)

2024-12-11 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea edited https://github.com/llvm/llvm-project/pull/119231 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64][FMV] Add missing feature dependencies and detect at runtime. (PR #119231)

2024-12-10 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea edited https://github.com/llvm/llvm-project/pull/119231 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64][FMV] Add missing feature dependencies and detect at runtime. (PR #119231)

2024-12-10 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea edited https://github.com/llvm/llvm-project/pull/119231 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [FMV][AArch64][clang] Emit fmv-features metadata in LLVM IR. (PR #118544)

2024-12-10 Thread Alexandros Lamprineas via cfe-commits
labrinea wrote: Thanks for looking into this Andrew. There's one thing I would like to clarify here. Jon expressed the opinion that in your example the command line should determine the highest priority version (i8mm+fcma), which isn't what https://github.com/ARM-software/acle/pull/370 suggest

[clang] [llvm] [AArch64][FMV] Add missing feature dependencies and detect at runtime. (PR #119231)

2024-12-10 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea edited https://github.com/llvm/llvm-project/pull/119231 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64][FMV] Add missing feature dependencies and detect at runtime. (PR #119231)

2024-12-10 Thread Alexandros Lamprineas via cfe-commits
@@ -349,6 +349,14 @@ void AArch64::ExtensionSet::reconstructFromParsedFeatures( } } +uint64_t AArch64::ExtensionSet::toCpuSupportsMask() const { labrinea wrote: Hmm, I am thinking we may want to reuse this once we change [getFMVPriority](https://github.com

[clang] [llvm] [AArch64][FMV] Add missing feature dependencies and detect at runtime. (PR #119231)

2024-12-10 Thread Alexandros Lamprineas via cfe-commits
@@ -61,13 +61,13 @@ unsigned AArch64::getFMVPriority(ArrayRef Features) { return Priority + MaxFMVPriority * NumFeatures; } -uint64_t AArch64::getCpuSupportsMask(ArrayRef FeatureStrs) { - uint64_t FeaturesMask = 0; - for (const StringRef &FeatureStr : FeatureStrs) { -

[clang] [llvm] [AArch64][FMV] Add missing feature dependencies and detect at runtime. (PR #119231)

2024-12-10 Thread Alexandros Lamprineas via cfe-commits
@@ -61,13 +61,13 @@ unsigned AArch64::getFMVPriority(ArrayRef Features) { return Priority + MaxFMVPriority * NumFeatures; } -uint64_t AArch64::getCpuSupportsMask(ArrayRef FeatureStrs) { - uint64_t FeaturesMask = 0; - for (const StringRef &FeatureStr : FeatureStrs) { -

[clang] [llvm] [AArch64][FMV] Add missing feature dependencies and detect at runtime. (PR #119231)

2024-12-09 Thread Alexandros Lamprineas via cfe-commits
labrinea wrote: @sdesmalen-arm the dependencies were agreed internally with @paulwalker-arm. Let us know if you have any reservations. https://github.com/llvm/llvm-project/pull/119231 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lis

[clang] [llvm] [AArch64][FMV] Add missing feature dependencies and detect at runtime. (PR #119231)

2024-12-09 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea created https://github.com/llvm/llvm-project/pull/119231 i8mm -> simd fp16fml -> simd frintts -> fp bf16 -> simd sme -> fp16 Approved in ACLE as https://github.com/ARM-software/acle/pull/368 >From f6f2fd6aac09a0f2c14545e1fbda9aec7eb2ed46 Mon Sep 17 00:00:00 2001 Fro

[clang] [FMV][AArch64][clang] Emit fmv-features metadata in LLVM IR. (PR #118544)

2024-12-04 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea updated https://github.com/llvm/llvm-project/pull/118544 >From e028f19f1b4154e44c61e371ae5feeb522085338 Mon Sep 17 00:00:00 2001 From: Alexandros Lamprineas Date: Tue, 3 Dec 2024 20:22:37 + Subject: [PATCH] [FMV][AArch64][clang] Emit fmv-features metadata in LLVM

[clang] [FMV][AArch64][clang] Emit fmv-features metadata in LLVM IR. (PR #118544)

2024-12-04 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea ready_for_review https://github.com/llvm/llvm-project/pull/118544 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [FMV][AArch64][clang] Emit fmv-features metadata in LLVM IR. (PR #118544)

2024-12-04 Thread Alexandros Lamprineas via cfe-commits
labrinea wrote: > A motivating example might be target_version("simd+dotprod") and > target_version("sve"): when sve is available we should pick that version, but > the current rule prioritizes the number of attribute-specified features over > their overall weight. I agree about this. As I sa

[clang] [FMV][AArch64][clang] Emit fmv-features metadata in LLVM IR. (PR #118544)

2024-12-03 Thread Alexandros Lamprineas via cfe-commits
labrinea wrote: > > Suppose you have target_version("i8mm+dotprod") and target_version("fcma"). > > The first version clearly has higher priority > > According to the [current > rules](https://arm-software.github.io/acle/main/acle.html#selection) yes, but > IMO that rule is broken and doesn'

[clang] [FMV][AArch64][clang] Emit fmv-features metadata in LLVM IR. (PR #118544)

2024-12-03 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea converted_to_draft https://github.com/llvm/llvm-project/pull/118544 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [FMV][AArch64][clang] Emit fmv-features metadata in LLVM IR. (PR #118544)

2024-12-03 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea created https://github.com/llvm/llvm-project/pull/118544 We need to be able to propagate information about FMV attribute strings from C/C++ source to LLVM IR. This is necessary so that we can distinguish which target-features are coming from the cmdline, which are c

[clang] [clang] Remove unused lambda capture. (PR #117988)

2024-11-28 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea closed https://github.com/llvm/llvm-project/pull/117988 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Remove unused lambda capture. (PR #117988)

2024-11-28 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea created https://github.com/llvm/llvm-project/pull/117988 Fixes regression in sanitizer buildbots caused by #116257. >From 27de3fb4c80f909cd58ee4d579665fd6d8fdaf8d Mon Sep 17 00:00:00 2001 From: Alexandros Lamprineas Date: Thu, 28 Nov 2024 10:24:42 + Subject: [PA

[clang] [llvm] [NFC][clang][FMV][TargetInfo] Refactor API for FMV feature priority. (PR #116257)

2024-11-28 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea closed https://github.com/llvm/llvm-project/pull/116257 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NFC][clang][FMV][TargetInfo] Refactor API for FMV feature priority. (PR #116257)

2024-11-27 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea updated https://github.com/llvm/llvm-project/pull/116257 >From eb6fea771b0824fef979e5eef26718ecbc8c7f56 Mon Sep 17 00:00:00 2001 From: Alexandros Lamprineas Date: Thu, 14 Nov 2024 16:07:32 + Subject: [PATCH 1/7] [NFC][clang][FMV][TargetInfo] Refactor API for FMV

[clang] [llvm] [NFC][clang][FMV][TargetInfo] Refactor API for FMV feature priority. (PR #116257)

2024-11-27 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea edited https://github.com/llvm/llvm-project/pull/116257 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NFC][clang][FMV][TargetInfo] Refactor API for FMV feature priority. (PR #116257)

2024-11-27 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea updated https://github.com/llvm/llvm-project/pull/116257 >From eb6fea771b0824fef979e5eef26718ecbc8c7f56 Mon Sep 17 00:00:00 2001 From: Alexandros Lamprineas Date: Thu, 14 Nov 2024 16:07:32 + Subject: [PATCH 1/7] [NFC][clang][FMV][TargetInfo] Refactor API for FMV

[clang] [llvm] [NFC][clang][FMV][TargetInfo] Refactor API for FMV feature priority. (PR #116257)

2024-11-27 Thread Alexandros Lamprineas via cfe-commits
@@ -2938,36 +2914,17 @@ void CodeGenFunction::EmitRISCVMultiVersionResolver( bool HasDefault = false; unsigned DefaultIndex = 0; - SmallVector CurrOptions( - Options); - - llvm::stable_sort( - CurrOptions, [](const CodeGenFunction::MultiVersionResolverOption &L

[clang] [llvm] [NFC][clang][FMV][TargetInfo] Refactor API for FMV feature priority. (PR #116257)

2024-11-27 Thread Alexandros Lamprineas via cfe-commits
@@ -4303,21 +4288,15 @@ void CodeGenModule::emitMultiVersionFunctions() { continue; llvm::Function *Func = createFunction(CurFD, I); - StringRef Architecture; Feats.clear(); - if (getTarget().getTriple().is

[clang] [llvm] [NFC][clang][FMV][TargetInfo] Refactor API for FMV feature priority. (PR #116257)

2024-11-27 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea updated https://github.com/llvm/llvm-project/pull/116257 >From eb6fea771b0824fef979e5eef26718ecbc8c7f56 Mon Sep 17 00:00:00 2001 From: Alexandros Lamprineas Date: Thu, 14 Nov 2024 16:07:32 + Subject: [PATCH 1/6] [NFC][clang][FMV][TargetInfo] Refactor API for FMV

[clang] [llvm] [NFC][clang][FMV][TargetInfo] Refactor API for FMV feature priority. (PR #116257)

2024-11-26 Thread Alexandros Lamprineas via cfe-commits
@@ -4303,21 +4288,15 @@ void CodeGenModule::emitMultiVersionFunctions() { continue; llvm::Function *Func = createFunction(CurFD, I); - StringRef Architecture; Feats.clear(); - if (getTarget().getTriple().is

[clang] [llvm] [NFC][clang][FMV][TargetInfo] Refactor API for FMV feature priority. (PR #116257)

2024-11-26 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea edited https://github.com/llvm/llvm-project/pull/116257 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NFC][clang][FMV][TargetInfo] Refactor API for FMV feature priority. (PR #116257)

2024-11-26 Thread Alexandros Lamprineas via cfe-commits
@@ -2938,36 +2914,17 @@ void CodeGenFunction::EmitRISCVMultiVersionResolver( bool HasDefault = false; unsigned DefaultIndex = 0; - SmallVector CurrOptions( - Options); - - llvm::stable_sort( - CurrOptions, [](const CodeGenFunction::MultiVersionResolverOption &L

[clang] [llvm] [NFC][clang][FMV][TargetInfo] Refactor API for FMV feature priority. (PR #116257)

2024-11-25 Thread Alexandros Lamprineas via cfe-commits
labrinea wrote: @BeMg, does the RISC-V code look okay to you? https://github.com/llvm/llvm-project/pull/116257 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NFC][clang][FMV][TargetInfo] Refactor API for FMV feature priority. (PR #116257)

2024-11-25 Thread Alexandros Lamprineas via cfe-commits
@@ -4303,21 +4288,15 @@ void CodeGenModule::emitMultiVersionFunctions() { continue; llvm::Function *Func = createFunction(CurFD, I); - StringRef Architecture; Feats.clear(); - if (getTarget().getTriple().is

[clang] [clang][FMV] Fix crash with cpu_specific attribute. (PR #115762)

2024-11-25 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea updated https://github.com/llvm/llvm-project/pull/115762 >From aff962d795e56f7b41af44860feb77e656091b78 Mon Sep 17 00:00:00 2001 From: Alexandros Lamprineas Date: Mon, 11 Nov 2024 20:10:01 + Subject: [PATCH 1/3] [clang][FMV] Fix crash with cpu_specific attribute.

[clang] [clang][FMV] Fix crash with cpu_specific attribute. (PR #115762)

2024-11-25 Thread Alexandros Lamprineas via cfe-commits
labrinea wrote: ping https://github.com/llvm/llvm-project/pull/115762 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NFC][clang][FMV][TargetInfo] Refactor API for FMV feature priority. (PR #116257)

2024-11-25 Thread Alexandros Lamprineas via cfe-commits
labrinea wrote: ping https://github.com/llvm/llvm-project/pull/116257 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NFC][clang][FMV][TargetInfo] Refactor API for FMV feature priority. (PR #116257)

2024-11-21 Thread Alexandros Lamprineas via cfe-commits
labrinea wrote: The latest changes https://github.com/llvm/llvm-project/pull/116257/commits/c147f0cd439812114322e4edb72795d848af3d6d may go a bit beyond the scope of this refactoring. I wanted to address the matter raised on this thread https://github.com/llvm/llvm-project/pull/116257#discuss

[clang] [llvm] [NFC][clang][FMV][TargetInfo] Refactor API for FMV feature priority. (PR #116257)

2024-11-19 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea updated https://github.com/llvm/llvm-project/pull/116257 >From eb6fea771b0824fef979e5eef26718ecbc8c7f56 Mon Sep 17 00:00:00 2001 From: Alexandros Lamprineas Date: Thu, 14 Nov 2024 16:07:32 + Subject: [PATCH 1/4] [NFC][clang][FMV][TargetInfo] Refactor API for FMV

[clang] [llvm] [NFC][clang][FMV][TargetInfo] Refactor API for FMV feature priority. (PR #116257)

2024-11-18 Thread Alexandros Lamprineas via cfe-commits
@@ -4216,22 +4216,11 @@ static void ReplaceUsesOfNonProtoTypeWithRealFunction(llvm::GlobalValue *Old, llvm::Function *NewFn); static unsigned -TargetMVPriority(const TargetInfo &TI, - const CodeGenFunction:

[clang] [llvm] [NFC][clang][FMV][TargetInfo] Refactor API for FMV feature priority. (PR #116257)

2024-11-18 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea updated https://github.com/llvm/llvm-project/pull/116257 >From eb6fea771b0824fef979e5eef26718ecbc8c7f56 Mon Sep 17 00:00:00 2001 From: Alexandros Lamprineas Date: Thu, 14 Nov 2024 16:07:32 + Subject: [PATCH 1/3] [NFC][clang][FMV][TargetInfo] Refactor API for FMV

[clang] [llvm] [NFC][clang][FMV][TargetInfo] Refactor API for FMV feature priority. (PR #116257)

2024-11-18 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea updated https://github.com/llvm/llvm-project/pull/116257 >From eb6fea771b0824fef979e5eef26718ecbc8c7f56 Mon Sep 17 00:00:00 2001 From: Alexandros Lamprineas Date: Thu, 14 Nov 2024 16:07:32 + Subject: [PATCH 1/3] [NFC][clang][FMV][TargetInfo] Refactor API for FMV

[clang] [llvm] [NFC][clang][FMV][TargetInfo] Refactor API for FMV feature priority. (PR #116257)

2024-11-15 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea edited https://github.com/llvm/llvm-project/pull/116257 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NFC][clang][FMV][TargetInfo] Refactor API for FMV feature priority. (PR #116257)

2024-11-15 Thread Alexandros Lamprineas via cfe-commits
@@ -48,6 +48,19 @@ std::optional AArch64::ArchInfo::findBySubArch(StringRef SubA return {}; } +unsigned AArch64::getFMVPriority(ArrayRef Features) { + constexpr unsigned MaxFMVPriority = 1000; + unsigned Priority = 0; + unsigned NumFeatures = 0; + for (StringRef Feature

  1   2   3   4   5   6   >