https://github.com/bader edited https://github.com/llvm/llvm-project/pull/122379
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bader approved this pull request.
@tahonermann thanks a lot for the work. I really appreciate the detailed
description and comments!
@erichkeane did a great job with the code review, so I have nothing to add.
I just have one small question that does not affect the merge.
ht
@@ -362,3 +364,93 @@ void
SemaSYCL::CheckSYCLEntryPointFunctionDecl(FunctionDecl *FD) {
}
}
}
+
+namespace {
+
+// The body of a function declared with the [[sycl_kernel_entry_point]]
+// attribute is cloned and transformed to substitute references to the original
+// fu
tahonermann wrote:
> No idea why I can't respond to the individual threads but...
@erichkeane, in order to reduce notifications, I replied to your comments as a
review. You should generally be able to reply to them individually or as part
of a batched review from the "Files changed" tab, but G
https://github.com/tahonermann updated
https://github.com/llvm/llvm-project/pull/122379
>From a6342615862c8ec48459ec95334d812bcb6a6e55 Mon Sep 17 00:00:00 2001
From: Tom Honermann
Date: Wed, 8 May 2024 14:31:36 -0700
Subject: [PATCH 1/6] [SYCL] AST support for SYCL kernel entry point functions.
https://github.com/erichkeane approved this pull request.
make format happy, then LGTM.
https://github.com/llvm/llvm-project/pull/122379
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
erichkeane wrote:
No idea why I can't respond to the individual threads but...
>The coding standards don't specify to add a comment there and a brief survey
>of other headers in this directory indicates considerable inconsistency (72
>out of 123 .h files have them). I guess that is over 50% so
@@ -18,6 +18,7 @@
#include "clang/AST/StmtObjC.h"
#include "clang/AST/StmtOpenACC.h"
#include "clang/AST/StmtOpenMP.h"
+#include "clang/AST/StmtSYCL.h"
tahonermann wrote:
Hmm, looks like no reason at all. I'm guessing it was once needed for some
X-Macro usage
https://github.com/tahonermann edited
https://github.com/llvm/llvm-project/pull/122379
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -480,6 +480,7 @@ following requirements.
* Is not a C variadic function.
* Is not a coroutine.
* Is not defined as deleted or as defaulted.
+* Is not defined with a function try block.
tahonermann wrote:
The SYCL specification isn't relevant here as `sycl_k
@@ -0,0 +1,94 @@
+//===- StmtSYCL.h - Classes for SYCL kernel calls ---*- C++
-*-===//
+//
+// 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
https://github.com/tahonermann commented:
> I only saw 1 unresolved, not 2? But I resolved it. Can you point out the
> other?
The other one was [this
one](https://github.com/llvm/llvm-project/pull/122379#discussion_r1910706213);
You gave it a thumbs up, so I went ahead and resolved it now.
https://github.com/erichkeane approved this pull request.
3 comments are all 'nits', so once those conversations are resolved, this LGTM.
Please resolve those 3 before merging.
https://github.com/llvm/llvm-project/pull/122379
___
cfe-commits mailing
https://github.com/erichkeane commented:
I only saw 1 unresolved, not 2? But I resolved it. Can you point out the other?
https://github.com/llvm/llvm-project/pull/122379
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cg
@@ -0,0 +1,94 @@
+//===- StmtSYCL.h - Classes for SYCL kernel calls ---*- C++
-*-===//
+//
+// 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
@@ -18,6 +18,7 @@
#include "clang/AST/StmtObjC.h"
#include "clang/AST/StmtOpenACC.h"
#include "clang/AST/StmtOpenMP.h"
+#include "clang/AST/StmtSYCL.h"
erichkeane wrote:
Why is this here?
https://github.com/llvm/llvm-project/pull/122379
@@ -480,6 +480,7 @@ following requirements.
* Is not a C variadic function.
* Is not a coroutine.
* Is not defined as deleted or as defaulted.
+* Is not defined with a function try block.
erichkeane wrote:
Did we submit an issue against the SYCL spec here? Se
https://github.com/erichkeane edited
https://github.com/llvm/llvm-project/pull/122379
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,92 @@
+//===- StmtSYCL.h - Classes for SYCL kernel calls ---*- C++
-*-===//
+//
+// 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
tahonermann wrote:
@erichkeane, thank you for the prior code review. I believe I've addressed all
the concerns you raised. There are two conversations I left unresolved pending
any further response from you.
https://github.com/llvm/llvm-project/pull/122379
_
https://github.com/tahonermann edited
https://github.com/llvm/llvm-project/pull/122379
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,92 @@
+//===- StmtSYCL.h - Classes for SYCL kernel calls ---*- C++
-*-===//
+//
+// 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
@@ -1376,6 +1377,16 @@ void ASTDeclWriter::VisitBlockDecl(BlockDecl *D) {
Code = serialization::DECL_BLOCK;
}
+void ASTDeclWriter::VisitOutlinedFunctionDecl(OutlinedFunctionDecl *D) {
+ Record.push_back(D->getNumParams());
+ VisitDecl(D);
+ Record.push_back(D->isNothrow()
@@ -4678,6 +4678,95 @@ class BlockDecl : public Decl, public DeclContext {
}
};
+/// Represents a partial function definition.
+///
+/// An outlined function declaration contains the parameters and body of
+/// a function independent of other function definition concerns suc
@@ -4678,6 +4678,95 @@ class BlockDecl : public Decl, public DeclContext {
}
};
+/// Represents a partial function definition.
+///
+/// An outlined function declaration contains the parameters and body of
+/// a function independent of other function definition concerns suc
@@ -4678,6 +4678,95 @@ class BlockDecl : public Decl, public DeclContext {
}
};
+/// Represents a partial function definition.
+///
+/// An outlined function declaration contains the parameters and body of
+/// a function independent of other function definition concerns suc
https://github.com/tahonermann updated
https://github.com/llvm/llvm-project/pull/122379
>From d021c2ba6a5b3f501b2f87317cb9072781069d73 Mon Sep 17 00:00:00 2001
From: Tom Honermann
Date: Wed, 8 May 2024 14:31:36 -0700
Subject: [PATCH 1/4] [SYCL] AST support for SYCL kernel entry point functions.
@@ -4678,6 +4678,95 @@ class BlockDecl : public Decl, public DeclContext {
}
};
+/// Represents a partial function definition.
+///
+/// An outlined function declaration contains the parameters and body of
+/// a function independent of other function definition concerns suc
@@ -4678,6 +4678,95 @@ class BlockDecl : public Decl, public DeclContext {
}
};
+/// Represents a partial function definition.
+///
+/// An outlined function declaration contains the parameters and body of
+/// a function independent of other function definition concerns suc
@@ -451,9 +452,9 @@ class ASTDeclReader : public DeclVisitor {
void VisitOMPDeclareMapperDecl(OMPDeclareMapperDecl *D);
void VisitOMPRequiresDecl(OMPRequiresDecl *D);
void VisitOMPCapturedExprDecl(OMPCapturedExprDecl *D);
- };
tahonermann wrote:
Committ
@@ -4678,6 +4678,95 @@ class BlockDecl : public Decl, public DeclContext {
}
};
+/// Represents a partial function definition.
+///
+/// An outlined function declaration contains the parameters and body of
+/// a function independent of other function definition concerns suc
@@ -0,0 +1,92 @@
+//===- StmtSYCL.h - Classes for SYCL kernel calls ---*- C++
-*-===//
+//
+// 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
@@ -4678,6 +4678,95 @@ class BlockDecl : public Decl, public DeclContext {
}
};
+/// Represents a partial function definition.
+///
+/// An outlined function declaration contains the parameters and body of
+/// a function independent of other function definition concerns suc
@@ -451,9 +452,9 @@ class ASTDeclReader : public DeclVisitor {
void VisitOMPDeclareMapperDecl(OMPDeclareMapperDecl *D);
void VisitOMPRequiresDecl(OMPRequiresDecl *D);
void VisitOMPCapturedExprDecl(OMPCapturedExprDecl *D);
- };
+};
- } // namespace clang
--
@@ -4678,6 +4678,95 @@ class BlockDecl : public Decl, public DeclContext {
}
};
+/// Represents a partial function definition.
+///
+/// An outlined function declaration contains the parameters and body of
+/// a function independent of other function definition concerns suc
@@ -0,0 +1,92 @@
+//===- StmtSYCL.h - Classes for SYCL kernel calls ---*- C++
-*-===//
+//
+// 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
@@ -1793,6 +1794,16 @@ void ASTDeclReader::VisitBlockDecl(BlockDecl *BD) {
BD->setCaptures(Reader.getContext(), captures, capturesCXXThis);
}
+void ASTDeclReader::VisitOutlinedFunctionDecl(OutlinedFunctionDecl *D) {
+ // NumParams is deserialized by OutlinedFunctionDecl::Cr
@@ -4678,6 +4678,95 @@ class BlockDecl : public Decl, public DeclContext {
}
};
+/// Represents a partial function definition.
+///
+/// An outlined function declaration contains the parameters and body of
+/// a function independent of other function definition concerns suc
@@ -451,9 +452,9 @@ class ASTDeclReader : public DeclVisitor {
void VisitOMPDeclareMapperDecl(OMPDeclareMapperDecl *D);
void VisitOMPRequiresDecl(OMPRequiresDecl *D);
void VisitOMPCapturedExprDecl(OMPCapturedExprDecl *D);
- };
erichkeane wrote:
Unrelate
@@ -451,9 +452,9 @@ class ASTDeclReader : public DeclVisitor {
void VisitOMPDeclareMapperDecl(OMPDeclareMapperDecl *D);
void VisitOMPRequiresDecl(OMPRequiresDecl *D);
void VisitOMPCapturedExprDecl(OMPCapturedExprDecl *D);
- };
+};
- } // namespace clang
--
@@ -0,0 +1,92 @@
+//===- StmtSYCL.h - Classes for SYCL kernel calls ---*- C++
-*-===//
+//
+// 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
@@ -1376,6 +1377,16 @@ void ASTDeclWriter::VisitBlockDecl(BlockDecl *D) {
Code = serialization::DECL_BLOCK;
}
+void ASTDeclWriter::VisitOutlinedFunctionDecl(OutlinedFunctionDecl *D) {
+ Record.push_back(D->getNumParams());
+ VisitDecl(D);
+ Record.push_back(D->isNothrow()
@@ -4678,6 +4678,95 @@ class BlockDecl : public Decl, public DeclContext {
}
};
+/// Represents a partial function definition.
+///
+/// An outlined function declaration contains the parameters and body of
+/// a function independent of other function definition concerns suc
@@ -4678,6 +4678,95 @@ class BlockDecl : public Decl, public DeclContext {
}
};
+/// Represents a partial function definition.
+///
+/// An outlined function declaration contains the parameters and body of
+/// a function independent of other function definition concerns suc
https://github.com/tahonermann updated
https://github.com/llvm/llvm-project/pull/122379
>From d021c2ba6a5b3f501b2f87317cb9072781069d73 Mon Sep 17 00:00:00 2001
From: Tom Honermann
Date: Wed, 8 May 2024 14:31:36 -0700
Subject: [PATCH 1/2] [SYCL] AST support for SYCL kernel entry point functions.
https://github.com/tahonermann updated
https://github.com/llvm/llvm-project/pull/122379
>From d021c2ba6a5b3f501b2f87317cb9072781069d73 Mon Sep 17 00:00:00 2001
From: Tom Honermann
Date: Wed, 8 May 2024 14:31:36 -0700
Subject: [PATCH 1/2] [SYCL] AST support for SYCL kernel entry point functions.
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 03eb786f75e36e9e203e0092ec3c6c589fd53c4f
d021c2ba6a5b3f501b2f87317cb9072781069d73 --e
llvmbot wrote:
@llvm/pr-subscribers-clang-modules
@llvm/pr-subscribers-clang
Author: Tom Honermann (tahonermann)
Changes
A SYCL kernel entry point function is a non-member function or a static member
function declared with the `sycl_kernel_entry_point` attribute. Such functions
define a
llvmbot wrote:
@llvm/pr-subscribers-clang-codegen
Author: Tom Honermann (tahonermann)
Changes
A SYCL kernel entry point function is a non-member function or a static member
function declared with the `sycl_kernel_entry_point` attribute. Such functions
define a pattern for an offload kern
https://github.com/tahonermann created
https://github.com/llvm/llvm-project/pull/122379
A SYCL kernel entry point function is a non-member function or a static member
function declared with the `sycl_kernel_entry_point` attribute. Such functions
define a pattern for an offload kernel entry poi
50 matches
Mail list logo