tuliom wrote:
@fpetrogalli I found a small issue with this PR. Could you take a look at PR
#84186 and review it, please?
https://github.com/llvm/llvm-project/pull/83584
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://github.com/fpetrogalli closed
https://github.com/llvm/llvm-project/pull/83584
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/fpetrogalli edited
https://github.com/llvm/llvm-project/pull/83584
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,79 @@
+// RUN: clang-tblgen -I %p/../../../clang/include/ %s --gen-clang-builtins |
FileCheck %s
+// RUN: not clang-tblgen -I %p/../../../clang/include/ %s --gen-clang-builtins
-DERROR_EXPECTED_LANES 2>&1 | FileCheck %s --check-prefix=ERROR_EXPECTED_LANES
+// RUN:
https://github.com/fpetrogalli updated
https://github.com/llvm/llvm-project/pull/83584
>From 53d9fe77500a18884f200c49db57336324305620 Mon Sep 17 00:00:00 2001
From: Francesco Petrogalli
Date: Fri, 1 Mar 2024 16:23:57 +0100
Subject: [PATCH 1/3] [clang][Builtins] Parse clang extended vectors
https://github.com/fpetrogalli updated
https://github.com/llvm/llvm-project/pull/83584
>From 53d9fe77500a18884f200c49db57336324305620 Mon Sep 17 00:00:00 2001
From: Francesco Petrogalli
Date: Fri, 1 Mar 2024 16:23:57 +0100
Subject: [PATCH 1/2] [clang][Builtins] Parse clang extended vectors
@@ -85,6 +123,23 @@ class PrototypeParser {
if (Substitution.empty())
PrintFatalError(Loc, "Not a template");
ParseType(Substitution);
+} else if (T.consume_front("_ExtVector")) {
+ // Clang extended vector types are mangled as follows:
+ //
+
https://github.com/AaronBallman approved this pull request.
LGTM aside from some extra test coverage and maybe a comment to be added.
https://github.com/llvm/llvm-project/pull/83584
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
@@ -0,0 +1,79 @@
+// RUN: clang-tblgen -I %p/../../../clang/include/ %s --gen-clang-builtins |
FileCheck %s
+// RUN: not clang-tblgen -I %p/../../../clang/include/ %s --gen-clang-builtins
-DERROR_EXPECTED_LANES 2>&1 | FileCheck %s --check-prefix=ERROR_EXPECTED_LANES
+// RUN:
https://github.com/AaronBallman edited
https://github.com/llvm/llvm-project/pull/83584
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -85,6 +123,23 @@ class PrototypeParser {
if (Substitution.empty())
PrintFatalError(Loc, "Not a template");
ParseType(Substitution);
+} else if (T.consume_front("_ExtVector")) {
+ // Clang extended vector types are mangled as follows:
+ //
+
@@ -85,6 +123,23 @@ class PrototypeParser {
if (Substitution.empty())
PrintFatalError(Loc, "Not a template");
ParseType(Substitution);
+} else if (T.consume_front("_ExtVector")) {
+ // Clang extended vector types are mangled as follows:
+ //
+
https://github.com/francisvm approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/83584
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
fpetrogalli wrote:
@francisvm / @philnik777 - I have opted for:
'_ExtVector<' ',' '>'
The reason for specifying first is due to the fact that it makes it
simpler to build the final string, because the `ParseType` function is
recursive.
https://github.com/llvm/llvm-project/pull/83584
https://github.com/fpetrogalli edited
https://github.com/llvm/llvm-project/pull/83584
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/fpetrogalli updated
https://github.com/llvm/llvm-project/pull/83584
>From 53d9fe77500a18884f200c49db57336324305620 Mon Sep 17 00:00:00 2001
From: Francesco Petrogalli
Date: Fri, 1 Mar 2024 16:23:57 +0100
Subject: [PATCH] [clang][Builtins] Parse clang extended vectors types.
francisvm wrote:
Maybe we can agree to not allow nested `<...>`, and it should simplify the
parsing a little?
https://github.com/llvm/llvm-project/pull/83584
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
philnik777 wrote:
Hm, yeah. I don't think it's worth complicating the parser for a tiny bit of
syntax sugar. I like your idea with a `:` quite a bit. `_ExtVector(bool:4)`
would also be an option. I don't have a strong preference either way. I'd like
to keep it separate from the name though to
fpetrogalli wrote:
Other C++ compatible option: provide a family of templates, one for each number
of lanes, templated on the type:
```
_ExtVector_N
```
So that we need up having:
```
_ExtVector_2
_ExtVector_6
...
```
This would be pretty easy to handle, without introducing extra
fpetrogalli wrote:
> > @philnik777 - thank you for the patch at #68324
>
> You're welcome!
>
> FWIW I'd find a syntax like `_ExtVector` better. The underscore and
> upper case to make it clear that it's non-standard and the angle bracket
> syntax since it's kind-of a template. This
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 2b4d67bf59d609321701540a15f48eda04688652
ab12de397fa0c028ad6b92751a31ccabfe89dc7d --
https://github.com/fpetrogalli updated
https://github.com/llvm/llvm-project/pull/83584
>From 9cd3e17192833e2cbafed55b649307ead32dcc3e Mon Sep 17 00:00:00 2001
From: Francesco Petrogalli
Date: Fri, 1 Mar 2024 16:23:57 +0100
Subject: [PATCH 1/4] [clang][Builtins] Parse clang extended vectors
philnik777 wrote:
> @philnik777 - thank you for the patch at #68324
You're welcome!
FWIW I'd find a syntax like `_ExtVector` better. The underscore and
upper case to make it clear that it's non-standard and the angle bracket syntax
since it's kind-of a template. This unfortunately doesn't
https://github.com/fpetrogalli updated
https://github.com/llvm/llvm-project/pull/83584
>From 2b4d67bf59d609321701540a15f48eda04688652 Mon Sep 17 00:00:00 2001
From: Vinayak Dev <104419489+vinayakd...@users.noreply.github.com>
Date: Fri, 1 Mar 2024 21:10:46 +0530
Subject: [PATCH 1/3]
https://github.com/fpetrogalli edited
https://github.com/llvm/llvm-project/pull/83584
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
fpetrogalli wrote:
@philnik777 - thank you for the patch at
https://github.com/llvm/llvm-project/pull/68324
I am extending the parser to be able to recognise clang extended vectors.
Thanks!
Francesco
https://github.com/llvm/llvm-project/pull/83584
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Francesco Petrogalli (fpetrogalli)
Changes
Clang extended vector types are mangled as follows:
ext_vector_type_lanes_scalar type
This is used to defetmine the builtins signature for builtins that use
parmeters defined as
typedef
https://github.com/fpetrogalli created
https://github.com/llvm/llvm-project/pull/83584
Clang extended vector types are mangled as follows:
ext_vector_type__
This is used to defetmine the builtins signature for builtins that use
parmeters defined as
typedef ext_vector_type__
28 matches
Mail list logo