https://github.com/tahonermann closed
https://github.com/llvm/llvm-project/pull/111389
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -455,6 +455,174 @@ The SYCL kernel in the previous code sample meets these
expectations.
}];
}
+def SYCLKernelEntryPointDocs : Documentation {
+ let Category = DocCatFunction;
+ let Content = [{
+The ``sycl_kernel_entry_point`` attribute facilitates the generation of a
@@ -14296,6 +14296,34 @@ void
ASTContext::getFunctionFeatureMap(llvm::StringMap &FeatureMap,
}
}
+static SYCLKernelInfo BuildSYCLKernelInfo(CanQualType KernelNameType,
+ const FunctionDecl *FD) {
+ return {KernelNameType, FD};
+}
+
https://github.com/tahonermann updated
https://github.com/llvm/llvm-project/pull/111389
>From 3c4a2b8a52d3f1c730df88a308dece21a67834ef Mon Sep 17 00:00:00 2001
From: Tom Honermann
Date: Fri, 4 Oct 2024 11:10:32 -0700
Subject: [PATCH 1/9] [SYCL] The sycl_kernel_entry_point attribute.
The `sycl_
https://github.com/erichkeane approved this pull request.
1 nit, else LGTM.
Please let @keryell chime in on the constexpr decision.
https://github.com/llvm/llvm-project/pull/111389
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.
@@ -14296,6 +14296,34 @@ void
ASTContext::getFunctionFeatureMap(llvm::StringMap &FeatureMap,
}
}
+static SYCLKernelInfo BuildSYCLKernelInfo(CanQualType KernelNameType,
+ const FunctionDecl *FD) {
+ return {KernelNameType, FD};
+}
+
https://github.com/erichkeane edited
https://github.com/llvm/llvm-project/pull/111389
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
tahonermann wrote:
@erichkeane, I believe all of the concerns you raised have been resolved with
the exception of the `constexpr` question for which you asked @keryell to weigh
in. I hope we're close to consensus on no need for a change for that one.
Please re-review when time permits.
https:
@@ -1155,6 +1155,15 @@ void ASTDeclReader::VisitFunctionDecl(FunctionDecl *FD) {
for (unsigned I = 0; I != NumParams; ++I)
Params.push_back(readDeclAs());
FD->setParams(Reader.getContext(), Params);
+
+ // If the declaration is a SYCL kernel entry point function as ind
@@ -14296,6 +14296,31 @@ void
ASTContext::getFunctionFeatureMap(llvm::StringMap &FeatureMap,
}
}
+static SYCLKernelInfo BuildSYCLKernelInfo(ASTContext &Context,
+ CanQualType KernelNameType,
+
https://github.com/tahonermann updated
https://github.com/llvm/llvm-project/pull/111389
>From 3c4a2b8a52d3f1c730df88a308dece21a67834ef Mon Sep 17 00:00:00 2001
From: Tom Honermann
Date: Fri, 4 Oct 2024 11:10:32 -0700
Subject: [PATCH 1/8] [SYCL] The sycl_kernel_entry_point attribute.
The `sycl_
@@ -407,7 +407,8 @@ def MicrosoftExt : LangOpt<"MicrosoftExt">;
def Borland : LangOpt<"Borland">;
def CUDA : LangOpt<"CUDA">;
def HIP : LangOpt<"HIP">;
-def SYCL : LangOpt<"SYCLIsDevice">;
+def SYCLHost : LangOpt<"SYCLIsHost">;
AaronBallman wrote:
IMO, where w
@@ -14296,6 +14296,31 @@ void
ASTContext::getFunctionFeatureMap(llvm::StringMap &FeatureMap,
}
}
+static SYCLKernelInfo BuildSYCLKernelInfo(ASTContext &Context,
+ CanQualType KernelNameType,
+
https://github.com/tahonermann updated
https://github.com/llvm/llvm-project/pull/111389
>From 3c4a2b8a52d3f1c730df88a308dece21a67834ef Mon Sep 17 00:00:00 2001
From: Tom Honermann
Date: Fri, 4 Oct 2024 11:10:32 -0700
Subject: [PATCH 1/7] [SYCL] The sycl_kernel_entry_point attribute.
The `sycl_
@@ -455,6 +455,174 @@ The SYCL kernel in the previous code sample meets these
expectations.
}];
}
+def SYCLKernelEntryPointDocs : Documentation {
+ let Category = DocCatFunction;
+ let Content = [{
+The ``sycl_kernel_entry_point`` attribute facilitates the generation of a
@@ -407,7 +407,8 @@ def MicrosoftExt : LangOpt<"MicrosoftExt">;
def Borland : LangOpt<"Borland">;
def CUDA : LangOpt<"CUDA">;
def HIP : LangOpt<"HIP">;
-def SYCL : LangOpt<"SYCLIsDevice">;
+def SYCLHost : LangOpt<"SYCLIsHost">;
tahonermann wrote:
Thanks, Erich
@@ -14296,6 +14296,31 @@ void
ASTContext::getFunctionFeatureMap(llvm::StringMap &FeatureMap,
}
}
+static SYCLKernelInfo BuildSYCLKernelInfo(ASTContext &Context,
+ CanQualType KernelNameType,
+
@@ -455,6 +455,174 @@ The SYCL kernel in the previous code sample meets these
expectations.
}];
}
+def SYCLKernelEntryPointDocs : Documentation {
+ let Category = DocCatFunction;
+ let Content = [{
+The ``sycl_kernel_entry_point`` attribute facilitates the generation of a
@@ -455,6 +455,174 @@ The SYCL kernel in the previous code sample meets these
expectations.
}];
}
+def SYCLKernelEntryPointDocs : Documentation {
+ let Category = DocCatFunction;
+ let Content = [{
+The ``sycl_kernel_entry_point`` attribute facilitates the generation of a
@@ -455,6 +455,174 @@ The SYCL kernel in the previous code sample meets these
expectations.
}];
}
+def SYCLKernelEntryPointDocs : Documentation {
+ let Category = DocCatFunction;
+ let Content = [{
+The ``sycl_kernel_entry_point`` attribute facilitates the generation of a
@@ -407,7 +407,8 @@ def MicrosoftExt : LangOpt<"MicrosoftExt">;
def Borland : LangOpt<"Borland">;
def CUDA : LangOpt<"CUDA">;
def HIP : LangOpt<"HIP">;
-def SYCL : LangOpt<"SYCLIsDevice">;
+def SYCLHost : LangOpt<"SYCLIsHost">;
erichkeane wrote:
Aaron chatted
@@ -12053,6 +12053,10 @@ bool Sema::CheckFunctionDeclaration(Scope *S,
FunctionDecl *NewFD,
if (LangOpts.OpenMP)
OpenMP().ActOnFinishedFunctionDefinitionInOpenMPAssumeScope(NewFD);
+ if (LangOpts.isSYCL() && NewFD->hasAttr() &&
+ !NewFD->isInvalidDecl() && !NewFD-
@@ -455,6 +455,174 @@ The SYCL kernel in the previous code sample meets these
expectations.
}];
}
+def SYCLKernelEntryPointDocs : Documentation {
+ let Category = DocCatFunction;
+ let Content = [{
+The ``sycl_kernel_entry_point`` attribute facilitates the generation of a
@@ -455,6 +455,174 @@ The SYCL kernel in the previous code sample meets these
expectations.
}];
}
+def SYCLKernelEntryPointDocs : Documentation {
+ let Category = DocCatFunction;
+ let Content = [{
+The ``sycl_kernel_entry_point`` attribute facilitates the generation of a
@@ -14296,6 +14296,31 @@ void
ASTContext::getFunctionFeatureMap(llvm::StringMap &FeatureMap,
}
}
+static SYCLKernelInfo BuildSYCLKernelInfo(ASTContext &Context,
+ CanQualType KernelNameType,
+
@@ -14296,6 +14296,31 @@ void
ASTContext::getFunctionFeatureMap(llvm::StringMap &FeatureMap,
}
}
+static SYCLKernelInfo BuildSYCLKernelInfo(ASTContext &Context,
+ CanQualType KernelNameType,
+
@@ -14296,6 +14296,31 @@ void
ASTContext::getFunctionFeatureMap(llvm::StringMap &FeatureMap,
}
}
+static SYCLKernelInfo BuildSYCLKernelInfo(ASTContext &Context,
+ CanQualType KernelNameType,
+
@@ -0,0 +1,137 @@
+// RUN: %clang_cc1 -triple x86_64-linux-gnu -std=c++17 -fsyntax-only
-fsycl-is-device -verify %s
tahonermann wrote:
Erich, I'm going to resolve this conversation regarding tests and diagnostics
(planned for the next PR). Please unresolve if t
@@ -14296,6 +14296,31 @@ void
ASTContext::getFunctionFeatureMap(llvm::StringMap &FeatureMap,
}
}
+static SYCLKernelInfo BuildSYCLKernelInfo(ASTContext &Context,
+ CanQualType KernelNameType,
+
@@ -0,0 +1,137 @@
+// RUN: %clang_cc1 -triple x86_64-linux-gnu -std=c++17 -fsyntax-only
-fsycl-is-device -verify %s
erichkeane wrote:
I think that is fine for me. Again, sorry for not seeing this one :/ I would
LOVE to see the list of 'things not diagnosed' d
@@ -14296,6 +14296,31 @@ void
ASTContext::getFunctionFeatureMap(llvm::StringMap &FeatureMap,
}
}
+static SYCLKernelInfo BuildSYCLKernelInfo(ASTContext &Context,
+ CanQualType KernelNameType,
+
@@ -0,0 +1,144 @@
+// Tests without serialization:
+// RUN: %clang_cc1 -std=c++17 -triple x86_64-unknown-unknown -fsycl-is-device \
+// RUN: -ast-dump %s \
+// RUN: | FileCheck --match-full-lines %s
+// RUN: %clang_cc1 -std=c++17 -triple x86_64-unknown-unknown -fsycl-is-host \
@@ -455,6 +455,174 @@ The SYCL kernel in the previous code sample meets these
expectations.
}];
}
+def SYCLKernelEntryPointDocs : Documentation {
+ let Category = DocCatFunction;
+ let Content = [{
+The ``sycl_kernel_entry_point`` attribute facilitates the generation of a
@@ -14296,6 +14296,31 @@ void
ASTContext::getFunctionFeatureMap(llvm::StringMap &FeatureMap,
}
}
+static SYCLKernelInfo BuildSYCLKernelInfo(ASTContext &Context,
+ CanQualType KernelNameType,
+
@@ -455,6 +455,64 @@ The SYCL kernel in the previous code sample meets these
expectations.
}];
}
+def SYCLKernelEntryPointDocs : Documentation {
+ let Category = DocCatFunction;
+ let Content = [{
+The ``sycl_kernel_entry_point`` attribute specifies that a function defini
@@ -455,6 +455,64 @@ The SYCL kernel in the previous code sample meets these
expectations.
}];
}
+def SYCLKernelEntryPointDocs : Documentation {
+ let Category = DocCatFunction;
+ let Content = [{
+The ``sycl_kernel_entry_point`` attribute specifies that a function defini
@@ -14296,6 +14296,31 @@ void
ASTContext::getFunctionFeatureMap(llvm::StringMap &FeatureMap,
}
}
+static SYCLKernelInfo BuildSYCLKernelInfo(ASTContext &Context,
+ CanQualType KernelNameType,
+
@@ -455,6 +455,174 @@ The SYCL kernel in the previous code sample meets these
expectations.
}];
}
+def SYCLKernelEntryPointDocs : Documentation {
+ let Category = DocCatFunction;
+ let Content = [{
+The ``sycl_kernel_entry_point`` attribute facilitates the generation of a
@@ -455,6 +455,64 @@ The SYCL kernel in the previous code sample meets these
expectations.
}];
}
+def SYCLKernelEntryPointDocs : Documentation {
+ let Category = DocCatFunction;
+ let Content = [{
+The ``sycl_kernel_entry_point`` attribute specifies that a function defini
@@ -198,3 +198,12 @@ void SemaSYCL::handleKernelAttr(Decl *D, const ParsedAttr
&AL) {
handleSimpleAttribute(*this, D, AL);
}
+
+void SemaSYCL::handleKernelEntryPointAttr(Decl *D, const ParsedAttr &AL) {
+ ParsedType PT = AL.getTypeArg();
+ TypeSourceInfo *TSI = nullptr;
+
@@ -14296,6 +14296,31 @@ void
ASTContext::getFunctionFeatureMap(llvm::StringMap &FeatureMap,
}
}
+static SYCLKernelInfo BuildSYCLKernelInfo(ASTContext &Context,
+ CanQualType KernelNameType,
+
@@ -455,6 +455,64 @@ The SYCL kernel in the previous code sample meets these
expectations.
}];
}
+def SYCLKernelEntryPointDocs : Documentation {
+ let Category = DocCatFunction;
+ let Content = [{
+The ``sycl_kernel_entry_point`` attribute specifies that a function defini
@@ -455,6 +455,64 @@ The SYCL kernel in the previous code sample meets these
expectations.
}];
}
+def SYCLKernelEntryPointDocs : Documentation {
+ let Category = DocCatFunction;
+ let Content = [{
+The ``sycl_kernel_entry_point`` attribute specifies that a function defini
@@ -0,0 +1,42 @@
+//===--- SYCLKernelInfo.h --- Information about SYCL kernels
--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apa
@@ -455,6 +455,174 @@ The SYCL kernel in the previous code sample meets these
expectations.
}];
}
+def SYCLKernelEntryPointDocs : Documentation {
+ let Category = DocCatFunction;
+ let Content = [{
+The ``sycl_kernel_entry_point`` attribute facilitates the generation of a
@@ -407,7 +407,8 @@ def MicrosoftExt : LangOpt<"MicrosoftExt">;
def Borland : LangOpt<"Borland">;
def CUDA : LangOpt<"CUDA">;
def HIP : LangOpt<"HIP">;
-def SYCL : LangOpt<"SYCLIsDevice">;
+def SYCLHost : LangOpt<"SYCLIsHost">;
tahonermann wrote:
With regard t
@@ -0,0 +1,144 @@
+// Tests without serialization:
+// RUN: %clang_cc1 -std=c++17 -triple x86_64-unknown-unknown -fsycl-is-device \
+// RUN: -ast-dump %s \
+// RUN: | FileCheck --match-full-lines %s
+// RUN: %clang_cc1 -std=c++17 -triple x86_64-unknown-unknown -fsycl-is-host \
https://github.com/erichkeane requested changes to this pull request.
See other comments/discussion.
https://github.com/llvm/llvm-project/pull/111389
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinf
@@ -407,7 +407,8 @@ def MicrosoftExt : LangOpt<"MicrosoftExt">;
def Borland : LangOpt<"Borland">;
def CUDA : LangOpt<"CUDA">;
def HIP : LangOpt<"HIP">;
-def SYCL : LangOpt<"SYCLIsDevice">;
+def SYCLHost : LangOpt<"SYCLIsHost">;
erichkeane wrote:
To me, this is
@@ -407,7 +407,8 @@ def MicrosoftExt : LangOpt<"MicrosoftExt">;
def Borland : LangOpt<"Borland">;
def CUDA : LangOpt<"CUDA">;
def HIP : LangOpt<"HIP">;
-def SYCL : LangOpt<"SYCLIsDevice">;
+def SYCLHost : LangOpt<"SYCLIsHost">;
tahonermann wrote:
The `SYCLIsDe
@@ -12053,6 +12053,10 @@ bool Sema::CheckFunctionDeclaration(Scope *S,
FunctionDecl *NewFD,
if (LangOpts.OpenMP)
OpenMP().ActOnFinishedFunctionDefinitionInOpenMPAssumeScope(NewFD);
+ if (LangOpts.isSYCL() && NewFD->hasAttr() &&
+ !NewFD->isInvalidDecl() && !NewFD-
@@ -12053,6 +12053,10 @@ bool Sema::CheckFunctionDeclaration(Scope *S,
FunctionDecl *NewFD,
if (LangOpts.OpenMP)
OpenMP().ActOnFinishedFunctionDefinitionInOpenMPAssumeScope(NewFD);
+ if (LangOpts.isSYCL() && NewFD->hasAttr() &&
+ !NewFD->isInvalidDecl() && !NewFD-
@@ -12053,6 +12053,10 @@ bool Sema::CheckFunctionDeclaration(Scope *S,
FunctionDecl *NewFD,
if (LangOpts.OpenMP)
OpenMP().ActOnFinishedFunctionDefinitionInOpenMPAssumeScope(NewFD);
+ if (LangOpts.isSYCL() && NewFD->hasAttr() &&
+ !NewFD->isInvalidDecl() && !NewFD-
@@ -12053,6 +12053,10 @@ bool Sema::CheckFunctionDeclaration(Scope *S,
FunctionDecl *NewFD,
if (LangOpts.OpenMP)
OpenMP().ActOnFinishedFunctionDefinitionInOpenMPAssumeScope(NewFD);
+ if (LangOpts.isSYCL() && NewFD->hasAttr() &&
+ !NewFD->isInvalidDecl() && !NewFD-
@@ -12053,6 +12053,10 @@ bool Sema::CheckFunctionDeclaration(Scope *S,
FunctionDecl *NewFD,
if (LangOpts.OpenMP)
OpenMP().ActOnFinishedFunctionDefinitionInOpenMPAssumeScope(NewFD);
+ if (LangOpts.isSYCL() && NewFD->hasAttr() &&
+ !NewFD->isInvalidDecl() && !NewFD-
@@ -0,0 +1,144 @@
+// Tests without serialization:
+// RUN: %clang_cc1 -std=c++17 -triple x86_64-unknown-unknown -fsycl-is-device \
+// RUN: -ast-dump %s \
+// RUN: | FileCheck --match-full-lines %s
+// RUN: %clang_cc1 -std=c++17 -triple x86_64-unknown-unknown -fsycl-is-host \
@@ -455,6 +455,174 @@ The SYCL kernel in the previous code sample meets these
expectations.
}];
}
+def SYCLKernelEntryPointDocs : Documentation {
+ let Category = DocCatFunction;
+ let Content = [{
+The ``sycl_kernel_entry_point`` attribute facilitates the generation of a
@@ -455,6 +455,174 @@ The SYCL kernel in the previous code sample meets these
expectations.
}];
}
+def SYCLKernelEntryPointDocs : Documentation {
+ let Category = DocCatFunction;
+ let Content = [{
+The ``sycl_kernel_entry_point`` attribute facilitates the generation of a
@@ -12053,6 +12053,10 @@ bool Sema::CheckFunctionDeclaration(Scope *S,
FunctionDecl *NewFD,
if (LangOpts.OpenMP)
OpenMP().ActOnFinishedFunctionDefinitionInOpenMPAssumeScope(NewFD);
+ if (LangOpts.isSYCL() && NewFD->hasAttr() &&
+ !NewFD->isInvalidDecl() && !NewFD-
@@ -12053,6 +12053,10 @@ bool Sema::CheckFunctionDeclaration(Scope *S,
FunctionDecl *NewFD,
if (LangOpts.OpenMP)
OpenMP().ActOnFinishedFunctionDefinitionInOpenMPAssumeScope(NewFD);
+ if (LangOpts.isSYCL() && NewFD->hasAttr() &&
+ !NewFD->isInvalidDecl() && !NewFD-
@@ -455,6 +455,174 @@ The SYCL kernel in the previous code sample meets these
expectations.
}];
}
+def SYCLKernelEntryPointDocs : Documentation {
+ let Category = DocCatFunction;
+ let Content = [{
+The ``sycl_kernel_entry_point`` attribute facilitates the generation of a
@@ -407,7 +407,8 @@ def MicrosoftExt : LangOpt<"MicrosoftExt">;
def Borland : LangOpt<"Borland">;
def CUDA : LangOpt<"CUDA">;
def HIP : LangOpt<"HIP">;
-def SYCL : LangOpt<"SYCLIsDevice">;
+def SYCLHost : LangOpt<"SYCLIsHost">;
tahonermann wrote:
I've never lo
@@ -12053,6 +12053,10 @@ bool Sema::CheckFunctionDeclaration(Scope *S,
FunctionDecl *NewFD,
if (LangOpts.OpenMP)
OpenMP().ActOnFinishedFunctionDefinitionInOpenMPAssumeScope(NewFD);
+ if (LangOpts.isSYCL() && NewFD->hasAttr() &&
+ !NewFD->isInvalidDecl() && !NewFD-
@@ -12053,6 +12053,10 @@ bool Sema::CheckFunctionDeclaration(Scope *S,
FunctionDecl *NewFD,
if (LangOpts.OpenMP)
OpenMP().ActOnFinishedFunctionDefinitionInOpenMPAssumeScope(NewFD);
+ if (LangOpts.isSYCL() && NewFD->hasAttr() &&
+ !NewFD->isInvalidDecl() && !NewFD-
@@ -455,6 +455,174 @@ The SYCL kernel in the previous code sample meets these
expectations.
}];
}
+def SYCLKernelEntryPointDocs : Documentation {
+ let Category = DocCatFunction;
+ let Content = [{
+The ``sycl_kernel_entry_point`` attribute facilitates the generation of a
@@ -14296,6 +14296,29 @@ void
ASTContext::getFunctionFeatureMap(llvm::StringMap &FeatureMap,
}
}
+static SYCLKernelInfo BuildSYCLKernelInfo(CanQualType KernelNameType,
erichkeane wrote:
Got it, thanks!
https://github.com/llvm/llvm-project/pull/111389
@@ -0,0 +1,42 @@
+//===--- SYCLKernelInfo.h --- Information about SYCL kernels
--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apa
@@ -14296,6 +14296,31 @@ void
ASTContext::getFunctionFeatureMap(llvm::StringMap &FeatureMap,
}
}
+static SYCLKernelInfo BuildSYCLKernelInfo(ASTContext &Context,
+ CanQualType KernelNameType,
+
@@ -455,6 +455,174 @@ The SYCL kernel in the previous code sample meets these
expectations.
}];
}
+def SYCLKernelEntryPointDocs : Documentation {
+ let Category = DocCatFunction;
+ let Content = [{
+The ``sycl_kernel_entry_point`` attribute facilitates the generation of a
@@ -14296,6 +14296,29 @@ void
ASTContext::getFunctionFeatureMap(llvm::StringMap &FeatureMap,
}
}
+static SYCLKernelInfo BuildSYCLKernelInfo(CanQualType KernelNameType,
tahonermann wrote:
I agree it is silly as is. It will get bigger; see
[here](https://gi
@@ -455,6 +455,174 @@ The SYCL kernel in the previous code sample meets these
expectations.
}];
}
+def SYCLKernelEntryPointDocs : Documentation {
+ let Category = DocCatFunction;
+ let Content = [{
+The ``sycl_kernel_entry_point`` attribute facilitates the generation of a
@@ -455,6 +455,174 @@ The SYCL kernel in the previous code sample meets these
expectations.
}];
}
+def SYCLKernelEntryPointDocs : Documentation {
+ let Category = DocCatFunction;
+ let Content = [{
+The ``sycl_kernel_entry_point`` attribute facilitates the generation of a
@@ -455,6 +455,174 @@ The SYCL kernel in the previous code sample meets these
expectations.
}];
}
+def SYCLKernelEntryPointDocs : Documentation {
+ let Category = DocCatFunction;
+ let Content = [{
+The ``sycl_kernel_entry_point`` attribute facilitates the generation of a
@@ -455,6 +455,174 @@ The SYCL kernel in the previous code sample meets these
expectations.
}];
}
+def SYCLKernelEntryPointDocs : Documentation {
+ let Category = DocCatFunction;
+ let Content = [{
+The ``sycl_kernel_entry_point`` attribute facilitates the generation of a
@@ -407,7 +407,8 @@ def MicrosoftExt : LangOpt<"MicrosoftExt">;
def Borland : LangOpt<"Borland">;
def CUDA : LangOpt<"CUDA">;
def HIP : LangOpt<"HIP">;
-def SYCL : LangOpt<"SYCLIsDevice">;
+def SYCLHost : LangOpt<"SYCLIsHost">;
erichkeane wrote:
Those are a we
@@ -14296,6 +14296,31 @@ void
ASTContext::getFunctionFeatureMap(llvm::StringMap &FeatureMap,
}
}
+static SYCLKernelInfo BuildSYCLKernelInfo(ASTContext &Context,
+ CanQualType KernelNameType,
+
@@ -407,7 +407,8 @@ def MicrosoftExt : LangOpt<"MicrosoftExt">;
def Borland : LangOpt<"Borland">;
def CUDA : LangOpt<"CUDA">;
def HIP : LangOpt<"HIP">;
-def SYCL : LangOpt<"SYCLIsDevice">;
+def SYCLHost : LangOpt<"SYCLIsHost">;
keryell wrote:
On the other hand
https://github.com/erichkeane edited
https://github.com/llvm/llvm-project/pull/111389
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -407,7 +407,8 @@ def MicrosoftExt : LangOpt<"MicrosoftExt">;
def Borland : LangOpt<"Borland">;
def CUDA : LangOpt<"CUDA">;
def HIP : LangOpt<"HIP">;
-def SYCL : LangOpt<"SYCLIsDevice">;
+def SYCLHost : LangOpt<"SYCLIsHost">;
erichkeane wrote:
Is the `Is` we
@@ -14296,6 +14296,31 @@ void
ASTContext::getFunctionFeatureMap(llvm::StringMap &FeatureMap,
}
}
+static SYCLKernelInfo BuildSYCLKernelInfo(ASTContext &Context,
+ CanQualType KernelNameType,
+
@@ -455,6 +455,174 @@ The SYCL kernel in the previous code sample meets these
expectations.
}];
}
+def SYCLKernelEntryPointDocs : Documentation {
+ let Category = DocCatFunction;
+ let Content = [{
+The ``sycl_kernel_entry_point`` attribute facilitates the generation of a
@@ -455,6 +455,174 @@ The SYCL kernel in the previous code sample meets these
expectations.
}];
}
+def SYCLKernelEntryPointDocs : Documentation {
+ let Category = DocCatFunction;
+ let Content = [{
+The ``sycl_kernel_entry_point`` attribute facilitates the generation of a
@@ -1155,6 +1155,15 @@ void ASTDeclReader::VisitFunctionDecl(FunctionDecl *FD) {
for (unsigned I = 0; I != NumParams; ++I)
Params.push_back(readDeclAs());
FD->setParams(Reader.getContext(), Params);
+
+ // If the declaration is a SYCL kernel entry point function as ind
@@ -0,0 +1,42 @@
+//===--- SYCLKernelInfo.h --- Information about SYCL kernels
--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apa
@@ -455,6 +455,174 @@ The SYCL kernel in the previous code sample meets these
expectations.
}];
}
+def SYCLKernelEntryPointDocs : Documentation {
+ let Category = DocCatFunction;
+ let Content = [{
+The ``sycl_kernel_entry_point`` attribute facilitates the generation of a
@@ -14296,6 +14296,29 @@ void
ASTContext::getFunctionFeatureMap(llvm::StringMap &FeatureMap,
}
}
+static SYCLKernelInfo BuildSYCLKernelInfo(CanQualType KernelNameType,
erichkeane wrote:
This function seems a little silly. Is this because we intend for it
@@ -0,0 +1,144 @@
+// Tests without serialization:
+// RUN: %clang_cc1 -std=c++17 -triple x86_64-unknown-unknown -fsycl-is-device \
+// RUN: -ast-dump %s \
+// RUN: | FileCheck --match-full-lines %s
+// RUN: %clang_cc1 -std=c++17 -triple x86_64-unknown-unknown -fsycl-is-host \
@@ -455,6 +455,174 @@ The SYCL kernel in the previous code sample meets these
expectations.
}];
}
+def SYCLKernelEntryPointDocs : Documentation {
+ let Category = DocCatFunction;
+ let Content = [{
+The ``sycl_kernel_entry_point`` attribute facilitates the generation of a
@@ -455,6 +455,174 @@ The SYCL kernel in the previous code sample meets these
expectations.
}];
}
+def SYCLKernelEntryPointDocs : Documentation {
+ let Category = DocCatFunction;
+ let Content = [{
+The ``sycl_kernel_entry_point`` attribute facilitates the generation of a
@@ -12053,6 +12053,10 @@ bool Sema::CheckFunctionDeclaration(Scope *S,
FunctionDecl *NewFD,
if (LangOpts.OpenMP)
OpenMP().ActOnFinishedFunctionDefinitionInOpenMPAssumeScope(NewFD);
+ if (LangOpts.isSYCL() && NewFD->hasAttr() &&
+ !NewFD->isInvalidDecl() && !NewFD-
https://github.com/erichkeane commented:
A handful of minor things, but overall I think this is alright.
https://github.com/llvm/llvm-project/pull/111389
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/l
https://github.com/tahonermann updated
https://github.com/llvm/llvm-project/pull/111389
>From 3c4a2b8a52d3f1c730df88a308dece21a67834ef Mon Sep 17 00:00:00 2001
From: Tom Honermann
Date: Fri, 4 Oct 2024 11:10:32 -0700
Subject: [PATCH 1/5] [SYCL] The sycl_kernel_entry_point attribute.
The `sycl_
https://github.com/tahonermann updated
https://github.com/llvm/llvm-project/pull/111389
>From 3c4a2b8a52d3f1c730df88a308dece21a67834ef Mon Sep 17 00:00:00 2001
From: Tom Honermann
Date: Fri, 4 Oct 2024 11:10:32 -0700
Subject: [PATCH 1/4] [SYCL] The sycl_kernel_entry_point attribute.
The `sycl_
@@ -14296,6 +14296,30 @@ void
ASTContext::getFunctionFeatureMap(llvm::StringMap &FeatureMap,
}
}
+static SYCLKernelInfo BuildSYCLKernelInfo(ASTContext &Context,
tahonermann wrote:
Done.
https://github.com/llvm/llvm-project/pull/111389
@@ -14296,6 +14296,30 @@ void
ASTContext::getFunctionFeatureMap(llvm::StringMap &FeatureMap,
}
}
+static SYCLKernelInfo BuildSYCLKernelInfo(ASTContext &Context,
tahonermann wrote:
Oops, yes. It will be needed in future PRs, but should be added then. I'll
https://github.com/bader approved this pull request.
LGTM, thanks!
I second @keryell: thank you for the good documentation.
https://github.com/llvm/llvm-project/pull/111389
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/
@@ -14296,6 +14296,30 @@ void
ASTContext::getFunctionFeatureMap(llvm::StringMap &FeatureMap,
}
}
+static SYCLKernelInfo BuildSYCLKernelInfo(ASTContext &Context,
bader wrote:
`Context` parameter is unused. I suppose it might trigger a compiler warning.
Can
https://github.com/bader edited https://github.com/llvm/llvm-project/pull/111389
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/keryell approved this pull request.
LGTM.
Thanks for the good documentation!
https://github.com/llvm/llvm-project/pull/111389
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe
erichkeane wrote:
> @erichkeane, I think I have addressed or replied to all of your comments.
> Another round of review feedback would be much appreciated!
>
> @bader, as SYCL code maintainer, I would appreciate if you can take a look.
I didnt get a chance to get back to this during the week,
1 - 100 of 135 matches
Mail list logo