[clang] [llvm] [ARM][AArch64] BTI, GCS, PAC Module flag update. (PR #86212)

2024-08-23 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 commented: LGTM in terms of addressing my previous comments, and I also do not have new ones. But I'm not deeply into the context of the patch, so I'd prefer to wait for other reviews on this. https://github.com/llvm/llvm-project/pull/86212 _

[clang] [llvm] [ARM][AArch64] BTI, GCS, PAC Module flag update. (PR #86212)

2024-08-08 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss updated https://github.com/llvm/llvm-project/pull/86212 >From f2f3356da08d68dab4431f49d0921515560e4927 Mon Sep 17 00:00:00 2001 From: Daniel Kiss Date: Fri, 8 Mar 2024 15:06:28 +0100 Subject: [PATCH 1/2] BTI,GCS,PAC Module flag update. Module flag is used t

[clang] [llvm] [ARM][AArch64] BTI, GCS, PAC Module flag update. (PR #86212)

2024-08-08 Thread Daniel Kiss via cfe-commits
@@ -5278,6 +5278,106 @@ void llvm::UpgradeFunctionAttributes(Function &F) { } } +// Check if the module attribute is present and set to one. +static bool isModuleAttributeOne(Module &M, const StringRef &ModAttr) { + const auto *Attr = + mdconst::extract_or_null(M.getMo

[clang] [llvm] [ARM][AArch64] BTI, GCS, PAC Module flag update. (PR #86212)

2024-08-08 Thread Daniel Kiss via cfe-commits
@@ -0,0 +1,86 @@ +;; Test verifies inlining happens cross module when module flags are upgraded. +;; `foo` and `main` are both old semantic while bar is the new semantic. +;; Regression test for #82763 + +; RUN: split-file %s %t +; RUN: opt -module-summary %t/foo.s -o %t/foo.o +;

[clang] [llvm] [ARM][AArch64] BTI, GCS, PAC Module flag update. (PR #86212)

2024-08-08 Thread Daniel Kiss via cfe-commits
@@ -0,0 +1,35 @@ +; This file contains the new semantic of the branch-target-enforcement, sign-return-address. +; Used for test mixing a mixed link case and also verify the import too in llc. + +; RUN: llc %s -o - | FileCheck %s DanielKristofKiss wrote: ack. ht

[clang] [llvm] [ARM][AArch64] BTI, GCS, PAC Module flag update. (PR #86212)

2024-08-08 Thread Daniel Kiss via cfe-commits
@@ -0,0 +1,35 @@ +; This file contains the new semantic of the branch-target-enforcement, sign-return-address. DanielKristofKiss wrote: done. https://github.com/llvm/llvm-project/pull/86212 ___ cfe-commits mailing lis

[clang] [llvm] [ARM][AArch64] BTI, GCS, PAC Module flag update. (PR #86212)

2024-08-08 Thread Daniel Kiss via cfe-commits
@@ -0,0 +1,35 @@ +; This file contains the new semantic of the branch-target-enforcement, sign-return-address. +; Used for test mixing a mixed link case and also verify the import too in llc. + +; RUN: llc %s -o - | FileCheck %s + +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64

[clang] [llvm] [ARM][AArch64] BTI, GCS, PAC Module flag update. (PR #86212)

2024-08-08 Thread Daniel Kiss via cfe-commits
@@ -0,0 +1,35 @@ +; This file contains the new semantic of the branch-target-enforcement, sign-return-address. +; Used for test mixing a mixed link case and also verify the import too in llc. + +; RUN: llc %s -o - | FileCheck %s + +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64

[clang] [llvm] [ARM][AArch64] BTI, GCS, PAC Module flag update. (PR #86212)

2024-07-22 Thread Daniil Kovalev via cfe-commits
@@ -0,0 +1,35 @@ +; This file contains the new semantic of the branch-target-enforcement, sign-return-address. +; Used for test mixing a mixed link case and also verify the import too in llc. + +; RUN: llc %s -o - | FileCheck %s + +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64

[clang] [llvm] [ARM][AArch64] BTI, GCS, PAC Module flag update. (PR #86212)

2024-07-22 Thread Daniil Kovalev via cfe-commits
@@ -0,0 +1,86 @@ +;; Test verifies inlining happens cross module when module flags are upgraded. +;; `foo` and `main` are both old semantic while bar is the new semantic. +;; Regression test for #82763 + +; RUN: split-file %s %t +; RUN: opt -module-summary %t/foo.s -o %t/foo.o +;

[clang] [llvm] [ARM][AArch64] BTI, GCS, PAC Module flag update. (PR #86212)

2024-07-22 Thread Daniil Kovalev via cfe-commits
@@ -0,0 +1,35 @@ +; This file contains the new semantic of the branch-target-enforcement, sign-return-address. kovdan01 wrote: Nit: in llvm/test/Bitcode/upgrade-branch-protection.ll, you use ';;' for actual comments and ';' for special RUN and CHECK lines. New

[clang] [llvm] [ARM][AArch64] BTI, GCS, PAC Module flag update. (PR #86212)

2024-07-22 Thread Daniil Kovalev via cfe-commits
@@ -0,0 +1,35 @@ +; This file contains the new semantic of the branch-target-enforcement, sign-return-address. +; Used for test mixing a mixed link case and also verify the import too in llc. + +; RUN: llc %s -o - | FileCheck %s kovdan01 wrote: I suppose it migh

[clang] [llvm] [ARM][AArch64] BTI, GCS, PAC Module flag update. (PR #86212)

2024-07-22 Thread Daniil Kovalev via cfe-commits
@@ -5278,6 +5278,106 @@ void llvm::UpgradeFunctionAttributes(Function &F) { } } +// Check if the module attribute is present and set to one. +static bool isModuleAttributeOne(Module &M, const StringRef &ModAttr) { + const auto *Attr = + mdconst::extract_or_null(M.getMo

[clang] [llvm] [ARM][AArch64] BTI, GCS, PAC Module flag update. (PR #86212)

2024-07-22 Thread Daniil Kovalev via cfe-commits
@@ -5278,6 +5278,106 @@ void llvm::UpgradeFunctionAttributes(Function &F) { } } +// Check if the module attribute is present and set to one. +static bool isModuleAttributeOne(Module &M, const StringRef &ModAttr) { + const auto *Attr = + mdconst::extract_or_null(M.getMo

[clang] [llvm] [ARM][AArch64] BTI, GCS, PAC Module flag update. (PR #86212)

2024-07-22 Thread Daniil Kovalev via cfe-commits
@@ -0,0 +1,35 @@ +; This file contains the new semantic of the branch-target-enforcement, sign-return-address. +; Used for test mixing a mixed link case and also verify the import too in llc. + +; RUN: llc %s -o - | FileCheck %s + +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64

[clang] [llvm] [ARM][AArch64] BTI, GCS, PAC Module flag update. (PR #86212)

2024-07-22 Thread Daniil Kovalev via cfe-commits
@@ -89,6 +89,9 @@ namespace llvm { /// info. Return true if module is modified. bool UpgradeDebugInfo(Module &M); + /// Copies module attributes to the functions in the module. + void CopyModuleAttrToFunctions(Module &M); kovdan01 wrote: Nit: it's proba

[clang] [llvm] [ARM][AArch64] BTI, GCS, PAC Module flag update. (PR #86212)

2024-07-21 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss updated https://github.com/llvm/llvm-project/pull/86212 >From f2f3356da08d68dab4431f49d0921515560e4927 Mon Sep 17 00:00:00 2001 From: Daniel Kiss Date: Fri, 8 Mar 2024 15:06:28 +0100 Subject: [PATCH] BTI,GCS,PAC Module flag update. Module flag is used to in

[clang] [llvm] [ARM][AArch64] BTI, GCS, PAC Module flag update. (PR #86212)

2024-05-20 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss updated https://github.com/llvm/llvm-project/pull/86212 >From f2f3356da08d68dab4431f49d0921515560e4927 Mon Sep 17 00:00:00 2001 From: Daniel Kiss Date: Fri, 8 Mar 2024 15:06:28 +0100 Subject: [PATCH] BTI,GCS,PAC Module flag update. Module flag is used to in