[clang] [llvm] New calling convention preserve_none (PR #76868)

2024-04-10 Thread Brandt Bucher via cfe-commits
brandtbucher wrote: Draft PR at https://github.com/llvm/llvm-project/pull/88333. https://github.com/llvm/llvm-project/pull/76868 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] New calling convention preserve_none (PR #76868)

2024-03-12 Thread via cfe-commits
weiguozhi wrote: > We have another use case for this calling convention - micropatching. See my > coworker's blog post on how this would work: > https://www.philipzucker.com/permutation_compile/ > I'm happy to see it's useful to you. > Is there a reason why r10 isn't included in the list of

[clang] [llvm] New calling convention preserve_none (PR #76868)

2024-03-10 Thread Caleb Helbling via cfe-commits
calebh wrote: We have another use case for this calling convention - micropatching. See my coworker's blog post on how this would work: https://www.philipzucker.com/permutation_compile/ Is there a reason why r10 isn't included in the list of registers for x64? Having support for additional

[clang] [llvm] New calling convention preserve_none (PR #76868)

2024-02-12 Thread Brandt Bucher via cfe-commits
brandtbucher wrote: Thanks for working on this! It's really appreciated. Two follow-up questions: - Is AArch64 support planned soon? - Am I correct in understanding that this missed the LLVM 18 cut, and won't until LLVM 19 in mid-August-ish? https://github.com/llvm/llvm-project/pull/76868

[clang] [llvm] New calling convention preserve_none (PR #76868)

2024-02-02 Thread David Li via cfe-commits
https://github.com/david-xl approved this pull request. https://github.com/llvm/llvm-project/pull/76868 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] New calling convention preserve_none (PR #76868)

2024-02-01 Thread via cfe-commits
https://github.com/weiguozhi updated https://github.com/llvm/llvm-project/pull/76868 >From 90e14918a0eb13e2187f8548416ac72491d966c1 Mon Sep 17 00:00:00 2001 From: Guozhi Wei Date: Thu, 21 Dec 2023 19:04:44 + Subject: [PATCH 1/7] New calling convention preserve_none The new calling

[clang] [llvm] New calling convention preserve_none (PR #76868)

2024-01-31 Thread David Li via cfe-commits
@@ -0,0 +1,131 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4 +; RUN: llc -mtriple=x86_64-unknown-unknown -mcpu=corei7 < %s | FileCheck %s + +; This test checks various function call behaviors between preserve_none and +;

[clang] [llvm] New calling convention preserve_none (PR #76868)

2024-01-30 Thread David Li via cfe-commits
@@ -0,0 +1,85 @@ +; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7 | FileCheck --check-prefixes=ALL %s +; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7-avx | FileCheck --check-prefixes=ALL,AVX %s + +; Don't need to preserve registers before using them.

[clang] [llvm] New calling convention preserve_none (PR #76868)

2024-01-30 Thread David Li via cfe-commits
@@ -416,6 +416,13 @@ added in the future: This calling convention, like the `PreserveMost` calling convention, will be used by a future version of the ObjectiveC runtime and should be considered experimental at this time. +"``preserve_nonecc``" - The

[clang] [llvm] New calling convention preserve_none (PR #76868)

2024-01-30 Thread David Li via cfe-commits
@@ -0,0 +1,85 @@ +; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7 | FileCheck --check-prefixes=ALL %s +; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7-avx | FileCheck --check-prefixes=ALL,AVX %s + +; Don't need to preserve registers before using them.

[clang] [llvm] New calling convention preserve_none (PR #76868)

2024-01-17 Thread via cfe-commits
@@ -1056,6 +1056,23 @@ def CC_Intel_OCL_BI : CallingConv<[ CCDelegateTo ]>; +def CC_X86_64_Preserve_None : CallingConv<[ + // We don't preserve general registers, so all of them can be used to pass + // arguments except + // - RBPframe pointer + // - R10

[clang] [llvm] New calling convention preserve_none (PR #76868)

2024-01-17 Thread via cfe-commits
https://github.com/weiguozhi updated https://github.com/llvm/llvm-project/pull/76868 >From 90e14918a0eb13e2187f8548416ac72491d966c1 Mon Sep 17 00:00:00 2001 From: Guozhi Wei Date: Thu, 21 Dec 2023 19:04:44 + Subject: [PATCH 1/4] New calling convention preserve_none The new calling

[clang] [llvm] New calling convention preserve_none (PR #76868)

2024-01-12 Thread via cfe-commits
https://github.com/weiguozhi updated https://github.com/llvm/llvm-project/pull/76868 >From 90e14918a0eb13e2187f8548416ac72491d966c1 Mon Sep 17 00:00:00 2001 From: Guozhi Wei Date: Thu, 21 Dec 2023 19:04:44 + Subject: [PATCH 1/3] New calling convention preserve_none The new calling

[clang] [llvm] New calling convention preserve_none (PR #76868)

2024-01-11 Thread via cfe-commits
@@ -1056,6 +1056,23 @@ def CC_Intel_OCL_BI : CallingConv<[ CCDelegateTo ]>; +def CC_X86_64_Preserve_None : CallingConv<[ + // We don't preserve general registers, so all of them can be used to pass + // arguments except + // - RBPframe pointer + // - R10

[clang] [llvm] New calling convention preserve_none (PR #76868)

2024-01-11 Thread James Y Knight via cfe-commits
@@ -1056,6 +1056,23 @@ def CC_Intel_OCL_BI : CallingConv<[ CCDelegateTo ]>; +def CC_X86_64_Preserve_None : CallingConv<[ + // We don't preserve general registers, so all of them can be used to pass + // arguments except + // - RBPframe pointer + // - R10

[clang] [llvm] New calling convention preserve_none (PR #76868)

2024-01-11 Thread Aaron Ballman via cfe-commits
@@ -2868,6 +2868,11 @@ def M68kRTD: DeclOrTypeAttr { let Documentation = [M68kRTDDocs]; } +def PreserveNone : DeclOrTypeAttr { + let Spellings = [Clang<"preserve_none">]; AaronBallman wrote: Calling conventions are somewhat odd in the attribute system, so

[clang] [llvm] New calling convention preserve_none (PR #76868)

2024-01-11 Thread Erich Keane via cfe-commits
@@ -2868,6 +2868,11 @@ def M68kRTD: DeclOrTypeAttr { let Documentation = [M68kRTDDocs]; } +def PreserveNone : DeclOrTypeAttr { + let Spellings = [Clang<"preserve_none">]; erichkeane wrote: The second example there is a function pointer, not a function

[clang] [llvm] New calling convention preserve_none (PR #76868)

2024-01-08 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: CFE changes aren't bad, just a few comments on how the attribute is defined in attr.td https://github.com/llvm/llvm-project/pull/76868 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] New calling convention preserve_none (PR #76868)

2024-01-08 Thread Erich Keane via cfe-commits
@@ -2868,6 +2868,11 @@ def M68kRTD: DeclOrTypeAttr { let Documentation = [M68kRTDDocs]; } +def PreserveNone : DeclOrTypeAttr { + let Spellings = [Clang<"preserve_none">]; erichkeane wrote: This should have a subjectlist set, since this is on functions, it

[clang] [llvm] New calling convention preserve_none (PR #76868)

2024-01-08 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: the clang changes should be split into a followup patch https://github.com/llvm/llvm-project/pull/76868 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] New calling convention preserve_none (PR #76868)

2024-01-03 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 8fdc3b98b894bbbe301b13cf8fc89663e1cbac1a 90e14918a0eb13e2187f8548416ac72491d966c1 --

[clang] [llvm] New calling convention preserve_none (PR #76868)

2024-01-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: None (weiguozhi) Changes The new experimental calling convention preserve_none is the opposite side of existing preserve_all. It tries to preserve as few general registers as possible. So all general registers are caller saved