DanielKristofKiss wrote:
> This still has "foo"="true" style function attributes, which are problematic.
> Is the plan to change that?
Can be changed to just "foo" just makes the function/module attribute importer
more complicated to handle the old IR.
@@ -1398,6 +1400,42 @@ class TargetInfo : public TransferrableTargetInfo,
}
llvm_unreachable("Unexpected SignReturnAddressKeyKind");
}
+
+ public:
+BranchProtectionInfo() = default;
DanielKristofKiss wrote:
We need the default
@@ -1398,6 +1400,42 @@ class TargetInfo : public TransferrableTargetInfo,
}
llvm_unreachable("Unexpected SignReturnAddressKeyKind");
}
+
+ public:
+BranchProtectionInfo() = default;
nickdesaulniers wrote:
Do we still need the default
@@ -43,4 +49,4 @@
// BTE-NOT: !"sign-return-address-with-bkey"
// B-KEY: !{i32 8, !"sign-return-address-with-bkey", i32 1}
-void foo() {}
+void foo() {}
nickdesaulniers wrote:
retain newline at EOF
https://github.com/llvm/llvm-project/pull/82819
@@ -116,37 +116,22 @@ class AArch64TargetCodeGenInfo : public TargetCodeGenInfo
{
if (!FD)
return;
-const auto *TA = FD->getAttr();
-if (TA == nullptr)
- return;
-
-ParsedTargetAttr Attr =
-
https://github.com/nickdesaulniers commented:
This still has "foo"="true" style function attributes, which are problematic.
Is the plan to change that?
https://github.com/llvm/llvm-project/pull/82819
___
cfe-commits mailing list
https://github.com/nickdesaulniers edited
https://github.com/llvm/llvm-project/pull/82819
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/DanielKristofKiss updated
https://github.com/llvm/llvm-project/pull/82819
>From 9e844b9e61ad1c81983aafd7ac9b3fb9e1939787 Mon Sep 17 00:00:00 2001
From: Daniel Kiss
Date: Mon, 22 Jan 2024 11:33:15 +0100
Subject: [PATCH] Emit attributes for functions always.
Branch
@@ -1369,13 +1369,50 @@ class TargetInfo : public TransferrableTargetInfo,
}
struct BranchProtectionInfo {
-LangOptions::SignReturnAddressScopeKind SignReturnAddr =
-LangOptions::SignReturnAddressScopeKind::None;
-LangOptions::SignReturnAddressKeyKind
@@ -173,6 +167,13 @@ class ARMTargetCodeGenInfo : public TargetCodeGenInfo {
diag::warn_target_unsupported_branch_protection_attribute)
<< Attr.CPU;
}
+} else if (CGM.getTarget().isBranchProtectionSupportedArch(
+
@@ -173,6 +167,13 @@ class ARMTargetCodeGenInfo : public TargetCodeGenInfo {
diag::warn_target_unsupported_branch_protection_attribute)
<< Attr.CPU;
}
+} else if (CGM.getTarget().isBranchProtectionSupportedArch(
+
@@ -109,38 +109,29 @@ class AArch64TargetCodeGenInfo : public TargetCodeGenInfo
{
if (!FD)
return;
-const auto *TA = FD->getAttr();
-if (TA == nullptr)
- return;
-
-ParsedTargetAttr Attr =
-
@@ -1369,13 +1369,50 @@ class TargetInfo : public TransferrableTargetInfo,
}
struct BranchProtectionInfo {
-LangOptions::SignReturnAddressScopeKind SignReturnAddr =
-LangOptions::SignReturnAddressScopeKind::None;
-LangOptions::SignReturnAddressKeyKind
@@ -1369,13 +1369,50 @@ class TargetInfo : public TransferrableTargetInfo,
}
struct BranchProtectionInfo {
-LangOptions::SignReturnAddressScopeKind SignReturnAddr =
-LangOptions::SignReturnAddressScopeKind::None;
-LangOptions::SignReturnAddressKeyKind
https://github.com/DanielKristofKiss updated
https://github.com/llvm/llvm-project/pull/82819
>From c5c2d720e822624fa7966297087b04e6b2fc2a86 Mon Sep 17 00:00:00 2001
From: Daniel Kiss
Date: Fri, 23 Feb 2024 17:12:26 +0100
Subject: [PATCH 1/4] [NFC][ARM][AArch64] Deduplicated code.
Add the
DanielKristofKiss wrote:
This handles the synthetic function in clang: #83277
https://github.com/llvm/llvm-project/pull/82819
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
DanielKristofKiss wrote:
Function attributes are only attached when they are set.
#83153 ensures the synthetic function are also gets the right attributes so
the backend doesn't need to use the module attributes #83154.
https://github.com/llvm/llvm-project/pull/82819
https://github.com/DanielKristofKiss updated
https://github.com/llvm/llvm-project/pull/82819
>From c5c2d720e822624fa7966297087b04e6b2fc2a86 Mon Sep 17 00:00:00 2001
From: Daniel Kiss
Date: Fri, 23 Feb 2024 17:12:26 +0100
Subject: [PATCH 1/2] [NFC][ARM][AArch64] Deduplicated code.
Add the
@@ -138,58 +163,79 @@ void run_foo_tml() {
// CHECK: resolver_return1:
// CHECK-NEXT:ret ptr @_ZN7MyClassIisE7foo_tmlEv._Mfrintts
// CHECK: resolver_else2:
-// CHECK-NEXT:ret ptr @_ZN7MyClassIisE7foo_tmlEv
+// CHECK-NEXT:ret ptr
@@ -0,0 +1,16 @@
+// REQUIRES: arm-registered-target
+
+// RUN: %clang -flto -target thumbv7m-unknown-unknown-eabi
-mbranch-protection=pac-ret %s -S -o - 2>&1 | FileCheck %s
DanielKristofKiss wrote:
Done
https://github.com/llvm/llvm-project/pull/82819
https://github.com/DanielKristofKiss updated
https://github.com/llvm/llvm-project/pull/82819
>From c5c2d720e822624fa7966297087b04e6b2fc2a86 Mon Sep 17 00:00:00 2001
From: Daniel Kiss
Date: Fri, 23 Feb 2024 17:12:26 +0100
Subject: [PATCH 1/3] [NFC][ARM][AArch64] Deduplicated code.
Add the
@@ -138,58 +163,79 @@ void run_foo_tml() {
// CHECK: resolver_return1:
// CHECK-NEXT:ret ptr @_ZN7MyClassIisE7foo_tmlEv._Mfrintts
// CHECK: resolver_else2:
-// CHECK-NEXT:ret ptr @_ZN7MyClassIisE7foo_tmlEv
+// CHECK-NEXT:ret ptr
@@ -138,58 +163,79 @@ void run_foo_tml() {
// CHECK: resolver_return1:
// CHECK-NEXT:ret ptr @_ZN7MyClassIisE7foo_tmlEv._Mfrintts
// CHECK: resolver_else2:
-// CHECK-NEXT:ret ptr @_ZN7MyClassIisE7foo_tmlEv
+// CHECK-NEXT:ret ptr
@@ -0,0 +1,16 @@
+// REQUIRES: arm-registered-target
+
+// RUN: %clang -flto -target thumbv7m-unknown-unknown-eabi
-mbranch-protection=pac-ret %s -S -o - 2>&1 | FileCheck %s
MaskRay wrote:
prefer `--target=` for new tests
For codegen tests we prefer
DanielKristofKiss wrote:
RFC as I'm not sure the right approach is to emit that many attribute always.
LLVM's Function::createWithDefaultAttr to be extended too with propagation of
the module flags to the function.
https://github.com/llvm/llvm-project/pull/82819
llvmbot wrote:
@llvm/pr-subscribers-clang-codegen
Author: Dani (DanielKristofKiss)
Changes
Branch protection, sign return address, guarded control stack attributes are
only emitted as module flags if not specified per function.
The inliner might inline functions with different set of
llvmbot wrote:
@llvm/pr-subscribers-backend-arm
@llvm/pr-subscribers-clang
Author: Dani (DanielKristofKiss)
Changes
Branch protection, sign return address, guarded control stack attributes are
only emitted as module flags if not specified per function.
The inliner might inline
https://github.com/DanielKristofKiss created
https://github.com/llvm/llvm-project/pull/82819
Branch protection, sign return address, guarded control stack attributes are
only emitted as module flags if not specified per function.
The inliner might inline functions with different set of
28 matches
Mail list logo