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
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
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 ar
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
___
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
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 conventi
@@ -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
+; n
@@ -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.
+de
@@ -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 `PreserveNone`
@@ -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.
+de
@@ -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
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 conventi
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 conventi
@@ -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
@@ -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
@@ -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
@@ -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 you'
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
https://lists.llvm.
@@ -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
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
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 --
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 reg
22 matches
Mail list logo