[clang] [Driver,AArch64] Remove AArch32-specific -m[no-]unaligned-access (PR #85441)

2024-03-18 Thread Jon Roelofs via cfe-commits
jroelofs wrote: > If Apple platforms need this option, I can keep it recognized but only for > Apple. I don't see any projects that use `-m(no-)unaligned-access`, but it could be that I don't have permissions on ones that do. I'll give our qualification team a heads-up if/when you land it, an

[clang] [FMV] Emit the resolver along with the default version definition. (PR #84405)

2024-03-19 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. All three LGTM. https://github.com/llvm/llvm-project/pull/84405 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reland [FMV] Emit the resolver along with the default version definit… (PR #85923)

2024-03-20 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. https://github.com/llvm/llvm-project/pull/85923 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [FMV] Allow multi versioning without default declaration. (PR #85454)

2024-03-22 Thread Jon Roelofs via cfe-commits
jroelofs wrote: re: stacking PRs: SPR is pretty handy: https://getcord.github.io/spr/ https://github.com/llvm/llvm-project/pull/85454 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [FMV] Allow multi versioning without default declaration. (PR #85454)

2024-03-22 Thread Jon Roelofs via cfe-commits
@@ -483,14 +483,16 @@ void just_fine(void) {} __arm_locally_streaming __attribute__((target_version("sme2"))) -void just_fine_locally_streaming(void) {} +void incompatible_locally_streaming(void) {} +// expected-error@-1 {{attribute 'target_version' multiversioning cannot be

[clang] [FMV] Allow multi versioning without default declaration. (PR #85454)

2024-03-22 Thread Jon Roelofs via cfe-commits
@@ -68,13 +68,15 @@ int __attribute__((target_version(""))) unsup1(void) { return 1; } void __attribute__((target_version("crc32"))) unsup2(void) {} void __attribute__((target_version("default+fp16"))) koo(void) {} +//expected-error@-1 {{function multiversioning doesn't suppo

[clang] [FMV] Allow multi versioning without default declaration. (PR #85454)

2024-03-22 Thread Jon Roelofs via cfe-commits
@@ -70,17 +69,23 @@ int __attribute__((target_version("lse"))) extc(void) { return 1; } auto __attribute__((target_version("default"))) ret1(void) { return 1; } auto __attribute__((target_version("dpb"))) ret2(void) { return 1; } +// expected-error@-1 {{attribute 'target_vers

[clang] [FMV] Allow multi versioning without default declaration. (PR #85454)

2024-03-22 Thread Jon Roelofs via cfe-commits
@@ -104,6 +103,7 @@ int __attribute__((target_version("sha2"))) combine(void) { return 1; } int __attribute__((aarch64_vector_pcs, target_version("sha3"))) combine(void) { return 2; } int __attribute__((target_version("fp+aes+pmull+rcpc"))) unspec_args() { return -1; } +//

[clang] [FMV] Allow multi versioning without default declaration. (PR #85454)

2024-03-22 Thread Jon Roelofs via cfe-commits
@@ -109,9 +109,22 @@ int unused_with_implicit_default_def(void) { return 1; } int unused_with_implicit_forward_default_def(void) { return 0; } __attribute__((target_version("lse"))) int unused_with_implicit_forward_default_def(void) { return 1; } -// This should generate a no

[clang] [FMV] Allow multi versioning without default declaration. (PR #85454)

2024-03-22 Thread Jon Roelofs via cfe-commits
@@ -109,9 +109,22 @@ int unused_with_implicit_default_def(void) { return 1; } int unused_with_implicit_forward_default_def(void) { return 0; } __attribute__((target_version("lse"))) int unused_with_implicit_forward_default_def(void) { return 1; } -// This should generate a no

[clang] [FMV] Allow multi versioning without default declaration. (PR #85454)

2024-03-23 Thread Jon Roelofs via cfe-commits
@@ -483,14 +483,16 @@ void just_fine(void) {} __arm_locally_streaming __attribute__((target_version("sme2"))) -void just_fine_locally_streaming(void) {} +void incompatible_locally_streaming(void) {} +// expected-error@-1 {{attribute 'target_version' multiversioning cannot be

[clang] [FMV] Allow multi versioning without default declaration. (PR #85454)

2024-03-23 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. https://github.com/llvm/llvm-project/pull/85454 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [FMV] Allow mixing target_version with target_clones. (PR #86493)

2024-03-25 Thread Jon Roelofs via cfe-commits
@@ -0,0 +1,278 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals --include-generated-funcs +// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature -v9.5a -S -emit-llvm -

[clang] [FMV] Allow mixing target_version with target_clones. (PR #86493)

2024-03-25 Thread Jon Roelofs via cfe-commits
@@ -0,0 +1,278 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals --include-generated-funcs +// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature -v9.5a -S -emit-llvm -

[clang] [FMV] Allow mixing target_version with target_clones. (PR #86493)

2024-03-25 Thread Jon Roelofs via cfe-commits
@@ -0,0 +1,278 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals --include-generated-funcs +// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature -v9.5a -S -emit-llvm -

[clang] [FMV] Allow mixing target_version with target_clones. (PR #86493)

2024-03-25 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs edited https://github.com/llvm/llvm-project/pull/86493 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [FMV] Allow mixing target_version with target_clones. (PR #86493)

2024-03-25 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/86493 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] clang: __builtin_VARIABLE_NAME (PR #86756)

2024-03-26 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs created https://github.com/llvm/llvm-project/pull/86756 Some C++ Embedded DSLs make use of `std::source_location` as a form of crude reflection. Until now, they didn't have a great way to reflect variable names into their IRs. With `__buitlin_SOURCE_LOCATION()`, t

[clang] clang: __builtin_VARIABLE_NAME (PR #86756)

2024-03-26 Thread Jon Roelofs via cfe-commits
@@ -2305,6 +2308,36 @@ APValue SourceLocExpr::EvaluateInContext(const ASTContext &Ctx, }; switch (getIdentKind()) { + case SourceLocIdentKind::VariableName: { +// __builtin_VARIABLE_NAME() is a Clang-specific extension that expands to +// the name of the variable

[clang] clang: __builtin_VARIABLE_NAME (PR #86756)

2024-03-26 Thread Jon Roelofs via cfe-commits
jroelofs wrote: Here's an example of the awkward lengths Halide has to go through to do this without compiler support: https://github.com/halide/Halide/blob/a132246ced07adc59c7b3631009464e5a14e0abb/src/Introspection.h#L19-L23 https://github.com/llvm/llvm-project/pull/86756

[clang] clang: __builtin_VARIABLE_NAME (PR #86756)

2024-03-27 Thread Jon Roelofs via cfe-commits
@@ -2305,6 +2308,36 @@ APValue SourceLocExpr::EvaluateInContext(const ASTContext &Ctx, }; switch (getIdentKind()) { + case SourceLocIdentKind::VariableName: { +// __builtin_VARIABLE_NAME() is a Clang-specific extension that expands to +// the name of the variable

[clang] [clang][FMV] Direct-call FMV callees from FMV callers (PR #80093)

2024-04-01 Thread Jon Roelofs via cfe-commits
jroelofs wrote: I'm not sure llvm needs to know the priorities. I haven't had time to work on this, but my plan was to have something that attempts to step through the resolver instruction by instruction with known bits for the value loaded from `__aarch64_cpu_features.features` according to t

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-01 Thread Jon Roelofs via cfe-commits
@@ -1980,6 +1981,23 @@ static void handleWeakRefAttr(Sema &S, Decl *D, const ParsedAttr &AL) { D->addAttr(::new (S.Context) WeakRefAttr(S.Context, AL)); } +// Mark alias/ifunc target as used. For C++, we look up the demangled name +// ignoring parameters. This should handle

[clang] [clang][sema] Fix -Wunused-function on target_version'd file-scope Fn's (PR #81167)

2024-02-08 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs created https://github.com/llvm/llvm-project/pull/81167 We should only warn if the default version is the one that is unused. Fixes: https://github.com/llvm/llvm-project/issues/80227 >From 96e3020eaa69f7f14b67617a250df3041cc1996b Mon Sep 17 00:00:00 2001 From: Jon R

[clang] [clang][sema] Fix -Wunused-function on target_version'd file-scope Fn's (PR #81167)

2024-02-08 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs updated https://github.com/llvm/llvm-project/pull/81167 >From 96e3020eaa69f7f14b67617a250df3041cc1996b Mon Sep 17 00:00:00 2001 From: Jon Roelofs Date: Thu, 8 Feb 2024 10:02:50 -0800 Subject: [PATCH 1/2] [clang][sema] Fix -Wunused-function on target_version'd file-s

[clang] [clang][sema] Fix -Wunused-function on target_version'd file-scope Fn's (PR #81167)

2024-02-08 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs updated https://github.com/llvm/llvm-project/pull/81167 >From 96e3020eaa69f7f14b67617a250df3041cc1996b Mon Sep 17 00:00:00 2001 From: Jon Roelofs Date: Thu, 8 Feb 2024 10:02:50 -0800 Subject: [PATCH 1/2] [clang][sema] Fix -Wunused-function on target_version'd file-s

[clang] [clang][fmv] Drop .ifunc from target_version's entrypoint's mangling (PR #81194)

2024-02-08 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs created https://github.com/llvm/llvm-project/pull/81194 Fixes: https://github.com/llvm/llvm-project/issues/81043 >From 92aef5a078583f69cede47374e2b97de865c5c5d Mon Sep 17 00:00:00 2001 From: Jon Roelofs Date: Thu, 8 Feb 2024 13:56:50 -0800 Subject: [PATCH] [clang][f

[clang] [clang][fmv] Drop .ifunc from target_version's entrypoint's mangling (PR #81194)

2024-02-08 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs updated https://github.com/llvm/llvm-project/pull/81194 >From 92aef5a078583f69cede47374e2b97de865c5c5d Mon Sep 17 00:00:00 2001 From: Jon Roelofs Date: Thu, 8 Feb 2024 13:56:50 -0800 Subject: [PATCH 1/2] [clang][fmv] Drop .ifunc from target_version's entrypoint's ma

[clang] [clang][fmv] Drop .ifunc from target_version's entrypoint's mangling (PR #81194)

2024-02-08 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs updated https://github.com/llvm/llvm-project/pull/81194 >From 92aef5a078583f69cede47374e2b97de865c5c5d Mon Sep 17 00:00:00 2001 From: Jon Roelofs Date: Thu, 8 Feb 2024 13:56:50 -0800 Subject: [PATCH 1/3] [clang][fmv] Drop .ifunc from target_version's entrypoint's ma

[clang] [clang][fmv] Drop .ifunc from target_version's entrypoint's mangling (PR #81194)

2024-02-08 Thread Jon Roelofs via cfe-commits
@@ -4393,7 +4394,7 @@ llvm::Constant *CodeGenModule::GetOrCreateMultiVersionResolver(GlobalDecl GD) { // a separate resolver). std::string ResolverName = MangledName; if (getTarget().supportsIFunc()) { -if (!FD->isTargetClonesMultiVersion()) +if (!FD->isTargetClo

[clang] [clang][fmv] Drop .ifunc from target_version's entrypoint's mangling (PR #81194)

2024-02-08 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs updated https://github.com/llvm/llvm-project/pull/81194 >From 92aef5a078583f69cede47374e2b97de865c5c5d Mon Sep 17 00:00:00 2001 From: Jon Roelofs Date: Thu, 8 Feb 2024 13:56:50 -0800 Subject: [PATCH 1/4] [clang][fmv] Drop .ifunc from target_version's entrypoint's ma

[clang] [clang][fmv] Drop .ifunc from target_version's entrypoint's mangling (PR #81194)

2024-02-09 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs closed https://github.com/llvm/llvm-project/pull/81194 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][sema] Fix -Wunused-function on target_version'd file-scope Fn's (PR #81167)

2024-02-09 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs closed https://github.com/llvm/llvm-project/pull/81167 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][sema][FMV] Forbid multi-versioning arm_streaming functions. (PR #81268)

2024-02-09 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs created https://github.com/llvm/llvm-project/pull/81268 The streaming mode change is incompatible with the ifunc mechanism used to implement FMV: we can't conditionally change it based on the particular callee that is resolved at runtime. Fixes: https://github.com/

[clang] [clang][sema][FMV] Forbid multi-versioning arm_streaming functions. (PR #81268)

2024-02-09 Thread Jon Roelofs via cfe-commits
@@ -3501,9 +3501,18 @@ bool Sema::checkTargetAttr(SourceLocation LiteralLoc, StringRef AttrStr) { return false; } +static bool isArmStreaming(const FunctionDecl *FD) { + if (FD->hasAttr()) +return true; jroelofs wrote: Oh, you're right, we don't need

[clang] 9bb54b2 - Move the new test added in 2095655f to its own file

2024-02-09 Thread Jon Roelofs via cfe-commits
Author: Jon Roelofs Date: 2024-02-09T09:02:56-08:00 New Revision: 9bb54b2aa006e3bf5df5eb8672075dd589fb9ba5 URL: https://github.com/llvm/llvm-project/commit/9bb54b2aa006e3bf5df5eb8672075dd589fb9ba5 DIFF: https://github.com/llvm/llvm-project/commit/9bb54b2aa006e3bf5df5eb8672075dd589fb9ba5.diff L

[clang] [clang][sema][FMV] Forbid multi-versioning arm_streaming functions. (PR #81268)

2024-02-09 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs updated https://github.com/llvm/llvm-project/pull/81268 >From 82a631017a114a15a6ba3376c049b7a85707973a Mon Sep 17 00:00:00 2001 From: Jon Roelofs Date: Thu, 8 Feb 2024 16:21:28 -0800 Subject: [PATCH 1/3] [clang][sema][FMV] Forbid multi-versioning arm_streaming funct

[clang] [clang][sema] Fix -Wunused-function on target_version'd file-scope Fn's (PR #81167)

2024-02-09 Thread Jon Roelofs via cfe-commits
jroelofs wrote: Moved the test to its own file to fix appease buildbots 9bb54b2aa006e3bf5df5eb8672075dd589fb9ba5 https://github.com/llvm/llvm-project/pull/81167 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[clang] [llvm] [TargetParser][AArch64] Add alias for FEAT_RDM. (PR #80540)

2024-02-09 Thread Jon Roelofs via cfe-commits
@@ -673,7 +673,7 @@ int hoo(void) { // // // CHECK: Function Attrs: noinline nounwind optnone -// CHECK-LABEL: define {{[^@]+}}@fmv_inline._MlseMrdm +// CHECK-LABEL: define {{[^@]+}}@fmv_inline._MlseMrdma jroelofs wrote: It seems potentially problematic that t

[clang] [llvm] [TargetParser][AArch64] Add alias for FEAT_RDM. (PR #80540)

2024-02-09 Thread Jon Roelofs via cfe-commits
@@ -673,7 +673,7 @@ int hoo(void) { // // // CHECK: Function Attrs: noinline nounwind optnone -// CHECK-LABEL: define {{[^@]+}}@fmv_inline._MlseMrdm +// CHECK-LABEL: define {{[^@]+}}@fmv_inline._MlseMrdma jroelofs wrote: What does GCC do? https://github.com/l

[clang] [llvm] [TargetParser][AArch64] Add alias for FEAT_RDM. (PR #80540)

2024-02-09 Thread Jon Roelofs via cfe-commits
@@ -39,7 +39,7 @@ inline int __attribute__((target_version("memtag3+rcpc3+mops"))) fmv_inline(void inline int __attribute__((target_version("aes+dotprod"))) fmv_inline(void) { return 13; } inline int __attribute__((target_version("simd+fp16fml"))) fmv_inline(void) { return 14

[clang] [Sema] Warn unused functions for FMV based on the target attribute (PR #81302)

2024-02-09 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. https://github.com/llvm/llvm-project/pull/81302 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Warn unused functions for FMV based on the target attribute (PR #81302)

2024-02-09 Thread Jon Roelofs via cfe-commits
jroelofs wrote: Thanks! https://github.com/llvm/llvm-project/pull/81302 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [TargetParser][AArch64] Add alias for FEAT_RDM. (PR #80540)

2024-02-10 Thread Jon Roelofs via cfe-commits
@@ -673,7 +673,7 @@ int hoo(void) { // // // CHECK: Function Attrs: noinline nounwind optnone -// CHECK-LABEL: define {{[^@]+}}@fmv_inline._MlseMrdm +// CHECK-LABEL: define {{[^@]+}}@fmv_inline._MlseMrdma jroelofs wrote: I think they are part of ABI, and givin

[clang] [clang][sema][FMV] Forbid multi-versioning arm_streaming functions. (PR #81268)

2024-02-12 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs updated https://github.com/llvm/llvm-project/pull/81268 >From 82a631017a114a15a6ba3376c049b7a85707973a Mon Sep 17 00:00:00 2001 From: Jon Roelofs Date: Thu, 8 Feb 2024 16:21:28 -0800 Subject: [PATCH 1/4] [clang][sema][FMV] Forbid multi-versioning arm_streaming funct

[clang] [clang][sema][FMV] Forbid multi-versioning arm_streaming functions. (PR #81268)

2024-02-12 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs closed https://github.com/llvm/llvm-project/pull/81268 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [TargetParser][AArch64] Add alias for FEAT_RDM. (PR #80540)

2024-02-12 Thread Jon Roelofs via cfe-commits
@@ -673,7 +673,7 @@ int hoo(void) { // // // CHECK: Function Attrs: noinline nounwind optnone -// CHECK-LABEL: define {{[^@]+}}@fmv_inline._MlseMrdm +// CHECK-LABEL: define {{[^@]+}}@fmv_inline._MlseMrdma jroelofs wrote: FWIW, I think it's okay to change this

[clang] bad error message on incorrect string literal #18079 (PR #81670)

2024-02-13 Thread Jon Roelofs via cfe-commits
jroelofs wrote: > I am new to this project. Please let me know if any files need to be added. > > I don't believe any testing or test suite changes are required for this > change. This particular change will break this usage of that diagnostic, which expects that format argument: https://git

[clang] [NFC][Docs] Documenting __builtin_cpu_supports. (PR #84098)

2024-03-05 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. Some small nits, but LGTM. https://github.com/llvm/llvm-project/pull/84098 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Docs] Documenting __builtin_cpu_supports. (PR #84098)

2024-03-05 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs edited https://github.com/llvm/llvm-project/pull/84098 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Docs] Documenting __builtin_cpu_supports. (PR #84098)

2024-03-05 Thread Jon Roelofs via cfe-commits
@@ -2799,6 +2799,34 @@ counter's true frequency will need to be provided by the user. Query for this feature with ``__has_builtin(__builtin_readsteadycounter)``. +``__builtin_cpu_supports`` +-- + +**Syntax**: + +.. code-block:: c++ + + int __builtin_

[clang] [FMV] Remove duplicate features from mangled name. (PR #84165)

2024-03-06 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. https://github.com/llvm/llvm-project/pull/84165 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Docs] Documenting __builtin_cpu_supports. (PR #84098)

2024-03-06 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. https://github.com/llvm/llvm-project/pull/84098 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [FMV] Emit the resolver along with the default version definition. (PR #84405)

2024-03-08 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. https://github.com/llvm/llvm-project/pull/84405 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [FMV] Emit the resolver along with the default version definition. (PR #84405)

2024-03-08 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs edited https://github.com/llvm/llvm-project/pull/84405 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [FMV] Emit the resolver along with the default version definition. (PR #84405)

2024-03-08 Thread Jon Roelofs via cfe-commits
@@ -85,7 +85,21 @@ int hoo(void) { } +// This should generate one target version but no resolver. +__attribute__((target_version("default"))) int unused_with_forward_default_decl(void); +__attribute__((target_version("mops"))) int unused_with_forward_default_decl(void) { re

[clang] [llvm] [CodeGen][AArch64][FMV] PAC the stub_helper's frame on arm64e (PR #84704)

2024-03-10 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs created https://github.com/llvm/llvm-project/pull/84704 ... and apply default function attributes so that the resolver will also be PAC'd (once more `arm64e` patches land upstream). >From b352a41e1788819afbb15a5b6d79cbf2968dc5dc Mon Sep 17 00:00:00 2001 From: Jon Ro

[clang] [llvm] [CodeGen][AArch64][FMV] PAC the stub_helper's frame on arm64e (PR #84704)

2024-03-10 Thread Jon Roelofs via cfe-commits
@@ -0,0 +1,58 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals --include-generated-funcs +// RUN: %clang_cc1 -triple arm64e-apple-ios -target-feature +ls64 -target-feature +fullfp

[clang] [llvm] [CodeGen][AArch64][FMV] PAC the stub_helper's frame on arm64e (PR #84704)

2024-03-11 Thread Jon Roelofs via cfe-commits
jroelofs wrote: some tests need UTC-ing because of the new attrs on the resolver: ``` Clang :: CodeGen/attr-cpuspecific.c Clang :: CodeGen/attr-target-clones.c Clang :: CodeGen/attr-target-mv-va-args.c Clang :: CodeGen/attr-target-mv.c Clang :: CodeGen/attr-target-version.c Clang :: C

[clang] [llvm] [CodeGen][AArch64][FMV] PAC the stub_helper's frame on arm64e (PR #84704)

2024-03-11 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs updated https://github.com/llvm/llvm-project/pull/84704 >From b352a41e1788819afbb15a5b6d79cbf2968dc5dc Mon Sep 17 00:00:00 2001 From: Jon Roelofs Date: Sun, 10 Mar 2024 16:46:50 -0700 Subject: [PATCH 1/2] [CodeGen][AArch64][FMV] PAC the stub_helper's frame on arm64e

[clang] [FMV] Use lexicographic order of feature names when mangling. (PR #83464)

2024-02-29 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. https://github.com/llvm/llvm-project/pull/83464 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [TargetParser][AArch64] Add alias for FEAT_RDM. (PR #80540)

2024-03-01 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. https://github.com/llvm/llvm-project/pull/80540 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [FMV] Allow target version definitions in any order. (PR #83887)

2024-03-04 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. Thank you, this is great! https://github.com/llvm/llvm-project/pull/83887 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][FMV] Direct-call multi-versioned callees from multi-versioned (PR #80093)

2024-01-30 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs created https://github.com/llvm/llvm-project/pull/80093 … callers when there is a callee with a matching feature set, and no other higher priority callee. This optimization helps the inliner see past the ifunc+resolver to the callee that we know it will always land

[clang] [clang][FMV] Direct-call FMV callees from FMV callers (PR #80093)

2024-01-30 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs edited https://github.com/llvm/llvm-project/pull/80093 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][FMV] Direct-call FMV callees from FMV callers (PR #80093)

2024-01-30 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs edited https://github.com/llvm/llvm-project/pull/80093 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][FMV] Direct-call FMV callees from FMV callers (PR #80093)

2024-01-31 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs updated https://github.com/llvm/llvm-project/pull/80093 >From ed52ee4424459ebc046a625341ad8dbbd38bcbe3 Mon Sep 17 00:00:00 2001 From: Jon Roelofs Date: Tue, 30 Jan 2024 19:13:42 -0800 Subject: [PATCH 1/2] [clang][FMV] Direct-call multi-versioned callees from multi-v

[clang] [clang][FMV] Direct-call FMV callees from FMV callers (PR #80093)

2024-01-31 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs updated https://github.com/llvm/llvm-project/pull/80093 >From ed52ee4424459ebc046a625341ad8dbbd38bcbe3 Mon Sep 17 00:00:00 2001 From: Jon Roelofs Date: Tue, 30 Jan 2024 19:13:42 -0800 Subject: [PATCH 1/3] [clang][FMV] Direct-call multi-versioned callees from multi-v

[clang] [clang][FMV] Direct-call FMV callees from FMV callers (PR #80093)

2024-01-31 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs updated https://github.com/llvm/llvm-project/pull/80093 >From ed52ee4424459ebc046a625341ad8dbbd38bcbe3 Mon Sep 17 00:00:00 2001 From: Jon Roelofs Date: Tue, 30 Jan 2024 19:13:42 -0800 Subject: [PATCH 1/4] [clang][FMV] Direct-call multi-versioned callees from multi-v

[clang] [clang][FMV] Direct-call FMV callees from FMV callers (PR #80093)

2024-01-31 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs updated https://github.com/llvm/llvm-project/pull/80093 >From ed52ee4424459ebc046a625341ad8dbbd38bcbe3 Mon Sep 17 00:00:00 2001 From: Jon Roelofs Date: Tue, 30 Jan 2024 19:13:42 -0800 Subject: [PATCH 1/6] [clang][FMV] Direct-call multi-versioned callees from multi-v

[clang] [clang][FMV] Direct-call FMV callees from FMV callers (PR #80093)

2024-01-31 Thread Jon Roelofs via cfe-commits
jroelofs wrote: My gut feel was that recovering this information from the callee's resolver's body would take heroics if we tried to do it in the backend. https://github.com/llvm/llvm-project/pull/80093 ___ cfe-commits mailing list cfe-commits@lists.l

[clang] [clang][FMV] Direct-call FMV callees from FMV callers (PR #80093)

2024-01-31 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs closed https://github.com/llvm/llvm-project/pull/80093 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][FMV] Direct-call FMV callees from FMV callers (PR #80093)

2024-01-31 Thread Jon Roelofs via cfe-commits
jroelofs wrote: Fair. I'll give that a shot. Doing it in opt has another big advantage I only just realized: it allows LTO to do the transformation. https://github.com/llvm/llvm-project/pull/80093 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[clang] Frontend: sink vendor definitions from Basic to Frontend (PR #80364)

2024-02-01 Thread Jon Roelofs via cfe-commits
@@ -804,6 +804,11 @@ static void InitializePredefinedMacros(const TargetInfo &TI, } } + if (TI.getTriple().getVendor() == Triple::AMD) +Builder.defineMacro("__AMD__"); + if (TI.getTriple().getVendor() == Triple::Apple) +Builder.defineMacro("__APPLE__"); --

[llvm] [clang] [FMV] Change feature priorities according to ACLE. (PR #79316)

2024-01-29 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs edited https://github.com/llvm/llvm-project/pull/79316 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [FMV] Change feature priorities according to ACLE. (PR #79316)

2024-01-29 Thread Jon Roelofs via cfe-commits
@@ -659,21 +659,21 @@ int hoo(void) { // // // CHECK: Function Attrs: noinline nounwind optnone -// CHECK-LABEL: define {{[^@]+}}@fmv_inline._Mfp16fmlMsimd +// CHECK-LABEL: define {{[^@]+}}@fmv_inline._MsimdMfp16fml // CHECK-SAME: () #[[ATTR7]] { // CHECK-NEXT: entry: // CH

[llvm] [clang] [FMV] Change feature priorities according to ACLE. (PR #79316)

2024-01-29 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. https://github.com/llvm/llvm-project/pull/79316 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][SME] Detect always_inline used with mismatched streaming attributes (PR #77936)

2024-01-12 Thread Jon Roelofs via cfe-commits
@@ -812,6 +819,23 @@ Address AArch64ABIInfo::EmitMSVAArg(CodeGenFunction &CGF, Address VAListAddr, /*allowHigherAlign*/ false); } +void AArch64TargetCodeGenInfo::checkFunctionCallABI( +CodeGenModule &CGM, SourceLocation CallLoc, const FunctionDec

[clang] [Clang][SME] Detect always_inline used with mismatched streaming attributes (PR #77936)

2024-01-12 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs edited https://github.com/llvm/llvm-project/pull/77936 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][SME] Detect always_inline used with mismatched streaming attributes (PR #77936)

2024-01-17 Thread Jon Roelofs via cfe-commits
@@ -153,6 +155,11 @@ class AArch64TargetCodeGenInfo : public TargetCodeGenInfo { } return TargetCodeGenInfo::isScalarizableAsmOperand(CGF, Ty); } + + void checkFunctionCallABI(CodeGenModule &CGM, SourceLocation CallLoc, jroelofs wrote: where is this

[llvm] [clang] [Clang][SME] Detect always_inline used with mismatched streaming attributes (PR #77936)

2024-01-18 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. https://github.com/llvm/llvm-project/pull/77936 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [AArch64][FMV] Support feature MOPS in Function Multi Versioning. (PR #78788)

2024-01-19 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. https://github.com/llvm/llvm-project/pull/78788 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Define __USER_LABEL_PREFIX__ to # for ARM64EC (PR #78913)

2024-01-21 Thread Jon Roelofs via cfe-commits
@@ -1462,10 +1462,12 @@ WindowsARM64TargetInfo::WindowsARM64TargetInfo(const llvm::Triple &Triple, } void WindowsARM64TargetInfo::setDataLayout() { - resetDataLayout(Triple.isOSBinFormatMachO() - ? "e-m:o-i64:64-i128:128-n32:64-S128" -

[clang] [Clang][AArch64] Define __USER_LABEL_PREFIX__ to # for ARM64EC (PR #78913)

2024-01-21 Thread Jon Roelofs via cfe-commits
@@ -1462,10 +1462,12 @@ WindowsARM64TargetInfo::WindowsARM64TargetInfo(const llvm::Triple &Triple, } void WindowsARM64TargetInfo::setDataLayout() { - resetDataLayout(Triple.isOSBinFormatMachO() - ? "e-m:o-i64:64-i128:128-n32:64-S128" -

[clang] [Clang][AArch64] Define __USER_LABEL_PREFIX__ to # for ARM64EC (PR #78913)

2024-01-22 Thread Jon Roelofs via cfe-commits
@@ -1462,10 +1462,12 @@ WindowsARM64TargetInfo::WindowsARM64TargetInfo(const llvm::Triple &Triple, } void WindowsARM64TargetInfo::setDataLayout() { - resetDataLayout(Triple.isOSBinFormatMachO() - ? "e-m:o-i64:64-i128:128-n32:64-S128" -

[clang] [AArch64][Clang] Fix linker error for function multiversioning (PR #74358)

2024-01-22 Thread Jon Roelofs via cfe-commits
@@ -1752,8 +1754,10 @@ static void AppendTargetClonesMangling(const CodeGenModule &CGM, const TargetInfo &TI = CGM.getTarget(); if (TI.getTriple().isAArch64()) { jroelofs wrote: @DanielKristofKiss slightly off topic: it's too bad `default` is implied, as i

[clang] [AArch64][Clang] Fix linker error for function multiversioning (PR #74358)

2024-01-22 Thread Jon Roelofs via cfe-commits
@@ -1752,8 +1754,10 @@ static void AppendTargetClonesMangling(const CodeGenModule &CGM, const TargetInfo &TI = CGM.getTarget(); if (TI.getTriple().isAArch64()) { jroelofs wrote: Right, it's too bad this incompatibility is baked into the spec. Are there ot

[clang] [AArch64][Clang] Fix linker error for function multiversioning (PR #74358)

2024-01-22 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. https://github.com/llvm/llvm-project/pull/74358 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] [unittest] Add a test for Generic_GCC::GCCVersion::Parse (PR #69078)

2023-10-18 Thread Jon Roelofs via cfe-commits
jroelofs wrote: Perhaps this belongs in the ABI-breaking-checks build? https://github.com/llvm/llvm-project/pull/69078 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] cb62f67 - Revert "[Intrinsics][ObjC] Mark objc_retain and friends as thisreturn."

2023-10-20 Thread Jon Roelofs via cfe-commits
Author: Jon Roelofs Date: 2023-10-20T09:22:12-07:00 New Revision: cb62f67088aaf79493350547f74870318b71acc5 URL: https://github.com/llvm/llvm-project/commit/cb62f67088aaf79493350547f74870318b71acc5 DIFF: https://github.com/llvm/llvm-project/commit/cb62f67088aaf79493350547f74870318b71acc5.diff L

[clang] [clang] [Gnu] Improve GCCVersion parsing to match versions such as "10-win32" (PR #69079)

2023-10-25 Thread Jon Roelofs via cfe-commits
@@ -2007,45 +2007,71 @@ Generic_GCC::GCCVersion Generic_GCC::GCCVersion::Parse(StringRef VersionText) { std::pair First = VersionText.split('.'); std::pair Second = First.second.split('.'); - GCCVersion GoodVersion = {VersionText.str(), -1, -1, -1, "", "", ""}; - if (Fi

[clang] [clang] [Gnu] Improve GCCVersion parsing to match versions such as "10-win32" (PR #69079)

2023-10-25 Thread Jon Roelofs via cfe-commits
@@ -2007,45 +2007,71 @@ Generic_GCC::GCCVersion Generic_GCC::GCCVersion::Parse(StringRef VersionText) { std::pair First = VersionText.split('.'); std::pair Second = First.second.split('.'); - GCCVersion GoodVersion = {VersionText.str(), -1, -1, -1, "", "", ""}; - if (Fi

[clang] [clang] [Gnu] Improve GCCVersion parsing to match versions such as "10-win32" (PR #69079)

2023-10-25 Thread Jon Roelofs via cfe-commits
Martin =?utf-8?q?Storsjö?= Message-ID: In-Reply-To: @@ -2007,45 +2007,71 @@ Generic_GCC::GCCVersion Generic_GCC::GCCVersion::Parse(StringRef VersionText) { std::pair First = VersionText.split('.'); std::pair Second = First.second.split('.'); - GCCVersion GoodVersion =

[clang] [clang] [Gnu] Improve GCCVersion parsing to match versions such as "10-win32" (PR #69079)

2023-10-25 Thread Jon Roelofs via cfe-commits
Martin =?utf-8?q?Storsjö?= Message-ID: In-Reply-To: @@ -2007,45 +2007,71 @@ Generic_GCC::GCCVersion Generic_GCC::GCCVersion::Parse(StringRef VersionText) { std::pair First = VersionText.split('.'); std::pair Second = First.second.split('.'); - GCCVersion GoodVersion =

[clang] [clang] [Gnu] Improve GCCVersion parsing to match versions such as "10-win32" (PR #69079)

2023-10-25 Thread Jon Roelofs via cfe-commits
Martin =?utf-8?q?Storsjö?= , Martin =?utf-8?q?Storsjö?= , Martin =?utf-8?q?Storsjö?= Message-ID: In-Reply-To: @@ -2007,45 +2007,71 @@ Generic_GCC::GCCVersion Generic_GCC::GCCVersion::Parse(StringRef VersionText) { std::pair First = VersionText.split('.'); std::pair Secon

[clang] [clang] [Gnu] Improve GCCVersion parsing to match versions such as "10-win32" (PR #69079)

2023-10-25 Thread Jon Roelofs via cfe-commits
Martin =?utf-8?q?Storsj=C3=B6?= , Martin =?utf-8?q?Storsj=C3=B6?= , Martin =?utf-8?q?Storsj=C3=B6?= Message-ID: In-Reply-To: https://github.com/jroelofs approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/69079 ___ cfe-commits

[clang] c145a1c - AArch64::ArchKind's underlying type is uint64_t

2020-09-17 Thread Jon Roelofs via cfe-commits
Author: Jon Roelofs Date: 2020-09-17T12:13:57-07:00 New Revision: c145a1ca2593e3b8b79687d5ba8c3230c41b5130 URL: https://github.com/llvm/llvm-project/commit/c145a1ca2593e3b8b79687d5ba8c3230c41b5130 DIFF: https://github.com/llvm/llvm-project/commit/c145a1ca2593e3b8b79687d5ba8c3230c41b5130.diff L

[clang] 51c5add - Extending Baremetal toolchain's support for the rtlib option.

2020-09-18 Thread Jon Roelofs via cfe-commits
Author: Jon Roelofs Date: 2020-09-18T09:19:37-07:00 New Revision: 51c5add8547a66caa5fbc9a19a91cd7976944229 URL: https://github.com/llvm/llvm-project/commit/51c5add8547a66caa5fbc9a19a91cd7976944229 DIFF: https://github.com/llvm/llvm-project/commit/51c5add8547a66caa5fbc9a19a91cd7976944229.diff L

[clang] 1deee5c - Fix crash when emitting NullReturn guards for functions returning BOOL

2021-01-21 Thread Jon Roelofs via cfe-commits
Author: Jon Roelofs Date: 2021-01-21T14:29:36-08:00 New Revision: 1deee5cacbb76578367186d7ff2937b6fa79b827 URL: https://github.com/llvm/llvm-project/commit/1deee5cacbb76578367186d7ff2937b6fa79b827 DIFF: https://github.com/llvm/llvm-project/commit/1deee5cacbb76578367186d7ff2937b6fa79b827.diff L

[clang] 7f6e331 - Support `#pragma clang section` directives on MachO targets

2021-02-25 Thread Jon Roelofs via cfe-commits
Author: Jon Roelofs Date: 2021-02-25T09:30:10-08:00 New Revision: 7f6e3316456f939a062aad0eeaac983251a1747c URL: https://github.com/llvm/llvm-project/commit/7f6e3316456f939a062aad0eeaac983251a1747c DIFF: https://github.com/llvm/llvm-project/commit/7f6e3316456f939a062aad0eeaac983251a1747c.diff L

<    1   2   3   4   5   >