tahonermann wrote:
@erichkeane, in case you missed the previous notice, this is ready for your
continued review.
https://github.com/llvm/llvm-project/pull/133030
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/ma
https://github.com/tahonermann commented:
Thank you for the review @erichkeane! I believe I have addressed or responded
to each of your comments.
https://github.com/llvm/llvm-project/pull/133030
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
@@ -14794,9 +14803,36 @@ void
ASTContext::getFunctionFeatureMap(llvm::StringMap &FeatureMap,
}
}
-static SYCLKernelInfo BuildSYCLKernelInfo(CanQualType KernelNameType,
+static SYCLKernelInfo BuildSYCLKernelInfo(ASTContext &Context,
+
@@ -0,0 +1,186 @@
+// RUN: %clang_cc1 -fsycl-is-host -emit-llvm -triple x86_64-unknown-linux-gnu
%s -o - | FileCheck --check-prefixes=CHECK-HOST,CHECK-HOST-LINUX %s
+// RUN: %clang_cc1 -fsycl-is-device -emit-llvm -aux-triple
x86_64-unknown-linux-gnu -triple amdgcn-amd-amdhsa %s
@@ -12816,6 +12816,15 @@ bool ASTContext::DeclMustBeEmitted(const Decl *D) {
if (!FD->doesThisDeclarationHaveABody())
return FD->doesDeclarationForceExternallyVisibleDefinition();
+// Function definitions with the sycl_kernel_entry_point attribute are
+// req
https://github.com/tahonermann updated
https://github.com/llvm/llvm-project/pull/133030
>From 2c99027df798c04d252ff8f66853888db89356f1 Mon Sep 17 00:00:00 2001
From: Elizabeth Andrews
Date: Tue, 25 Mar 2025 09:31:11 -0700
Subject: [PATCH 1/4] [SYCL] Basic code generation for SYCL kernel caller
@@ -0,0 +1,186 @@
+// RUN: %clang_cc1 -fsycl-is-host -emit-llvm -triple x86_64-unknown-linux-gnu
%s -o - | FileCheck --check-prefixes=CHECK-HOST,CHECK-HOST-LINUX %s
+// RUN: %clang_cc1 -fsycl-is-device -emit-llvm -aux-triple
x86_64-unknown-linux-gnu -triple amdgcn-amd-amdhsa %s
@@ -732,6 +732,16 @@
CodeGenTypes::arrangeBuiltinFunctionDeclaration(CanQualType resultType,
RequiredArgs::All);
}
+const CGFunctionInfo &
+CodeGenTypes::arrangeSYCLKernelCallerDeclaration(QualType resultType,
+
@@ -732,6 +732,16 @@
CodeGenTypes::arrangeBuiltinFunctionDeclaration(CanQualType resultType,
RequiredArgs::All);
}
+const CGFunctionInfo &
+CodeGenTypes::arrangeSYCLKernelCallerDeclaration(QualType resultType,
+
@@ -14794,9 +14803,36 @@ void
ASTContext::getFunctionFeatureMap(llvm::StringMap &FeatureMap,
}
}
-static SYCLKernelInfo BuildSYCLKernelInfo(CanQualType KernelNameType,
+static SYCLKernelInfo BuildSYCLKernelInfo(ASTContext &Context,
+
@@ -0,0 +1,186 @@
+// RUN: %clang_cc1 -fsycl-is-host -emit-llvm -triple x86_64-unknown-linux-gnu
%s -o - | FileCheck --check-prefixes=CHECK-HOST,CHECK-HOST-LINUX %s
+// RUN: %clang_cc1 -fsycl-is-device -emit-llvm -aux-triple
x86_64-unknown-linux-gnu -triple amdgcn-amd-amdhsa %s
@@ -0,0 +1,73 @@
+//===- CodeGenSYCL.cpp - Code for SYCL kernel generation
--===//
+//
+// 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 updated
https://github.com/llvm/llvm-project/pull/133030
>From 2c99027df798c04d252ff8f66853888db89356f1 Mon Sep 17 00:00:00 2001
From: Elizabeth Andrews
Date: Tue, 25 Mar 2025 09:31:11 -0700
Subject: [PATCH 1/3] [SYCL] Basic code generation for SYCL kernel caller
tahonermann wrote:
@Fznamznon, @frasercrmck, any further review feedback? @erichkeane, would you
like to weigh in on this change before it lands?
https://github.com/llvm/llvm-project/pull/133030
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
@@ -229,6 +229,12 @@ class CodeGenTypes {
const CGFunctionInfo &arrangeBuiltinFunctionCall(QualType resultType,
const CallArgList &args);
+ /// A SYCL device kernel function is a free standing function with
+ /// spir_kern
https://github.com/tahonermann updated
https://github.com/llvm/llvm-project/pull/133030
>From 2c99027df798c04d252ff8f66853888db89356f1 Mon Sep 17 00:00:00 2001
From: Elizabeth Andrews
Date: Tue, 25 Mar 2025 09:31:11 -0700
Subject: [PATCH 1/2] [SYCL] Basic code generation for SYCL kernel caller
@@ -0,0 +1,177 @@
+// RUN: %clang_cc1 -fsycl-is-host -emit-llvm -triple x86_64-unknown-linux-gnu
%s -o - | FileCheck --check-prefixes=CHECK-HOST,CHECK-HOST-LINUX %s
+// RUN: %clang_cc1 -fsycl-is-device -emit-llvm -aux-triple
x86_64-unknown-linux-gnu -triple amdgcn %s -o - | File
https://github.com/tahonermann edited
https://github.com/llvm/llvm-project/pull/128197
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -23,7 +23,8 @@ class SectionKind {
enum Kind {
/// Metadata - Debug info sections or other metadata.
Metadata,
-
+/// Shared
tahonermann wrote:
```suggestion
/// Shared - sections shared across processes.
```
https://github.com/llvm/llvm
https://github.com/tahonermann requested changes to this pull request.
This code looks pretty clean; simpler than I thought would be required. Yay! I
think I spotted why the section is getting labeled as constant; see comments.
https://github.com/llvm/llvm-project/pull/128197
__
@@ -5696,6 +5696,10 @@ void CodeGenModule::EmitGlobalVarDefinition(const
VarDecl *D,
const ASTContext::SectionInfo &SI = Context.SectionInfos[SA->getName()];
if ((SI.SectionFlags & ASTContext::PSF_Write) == 0)
GV->setConstant(true);
tahonermann w
https://github.com/tahonermann created
https://github.com/llvm/llvm-project/pull/133030
A function declared with the `sycl_kernel_entry_point` attribute, sometimes
called a SYCL kernel entry point function, specifies a pattern from which the
parameters and body of an offload entry point functi
https://github.com/tahonermann closed
https://github.com/llvm/llvm-project/pull/129113
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/tahonermann created
https://github.com/llvm/llvm-project/pull/130188
Static analysis identified two uses of `getAs()` for which the result pointer
was unconditionally dereferenced. Source code inspection confirmed that the
target type is assured by prior checks. This change
@@ -733,16 +733,17 @@ ENVIRONMENT
.. envvar:: CPATH
- If this environment variable is present, it is treated as a delimited list of
- paths to be added to the default system include path list. The delimiter is
- the platform dependent delimiter, as used in the PATH environ
https://github.com/tahonermann closed
https://github.com/llvm/llvm-project/pull/130188
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/tahonermann updated
https://github.com/llvm/llvm-project/pull/129113
>From b274bb5ef53ffc13093a5d454295cba21640dc4e Mon Sep 17 00:00:00 2001
From: Tom Honermann
Date: Thu, 27 Feb 2025 11:54:41 -0800
Subject: [PATCH 1/2] [Clang][Docs][NFC] Correct documentation for the CPATH
@@ -733,16 +733,17 @@ ENVIRONMENT
.. envvar:: CPATH
- If this environment variable is present, it is treated as a delimited list of
- paths to be added to the default system include path list. The delimiter is
- the platform dependent delimiter, as used in the PATH environ
@@ -733,16 +733,17 @@ ENVIRONMENT
.. envvar:: CPATH
- If this environment variable is present, it is treated as a delimited list of
- paths to be added to the default system include path list. The delimiter is
- the platform dependent delimiter, as used in the PATH environ
@@ -733,16 +733,17 @@ ENVIRONMENT
.. envvar:: CPATH
- If this environment variable is present, it is treated as a delimited list of
- paths to be added to the default system include path list. The delimiter is
- the platform dependent delimiter, as used in the PATH environ
https://github.com/tahonermann updated
https://github.com/llvm/llvm-project/pull/129113
>From b274bb5ef53ffc13093a5d454295cba21640dc4e Mon Sep 17 00:00:00 2001
From: Tom Honermann
Date: Thu, 27 Feb 2025 11:54:41 -0800
Subject: [PATCH] [Clang][Docs][NFC] Correct documentation for the CPATH
envi
https://github.com/tahonermann created
https://github.com/llvm/llvm-project/pull/129113
Clang's [current documentation for the `CPATH` environment
variable](https://clang.llvm.org/docs/CommandGuide/clang.html#envvar-CPATH)
states that paths it specifies are added as system header search paths.
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.
@@ -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/tahonermann updated
https://github.com/llvm/llvm-project/pull/105738
>From c5d4a8b94d0f5b294dda30b455c492e0a860906a Mon Sep 17 00:00:00 2001
From: Tom Honermann
Date: Thu, 22 Aug 2024 09:44:56 -0700
Subject: [PATCH] [Clang] Support for MSVC compatible header search path
orde
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
--
https://github.com/tahonermann updated
https://github.com/llvm/llvm-project/pull/105738
>From 1c9813eef03380f0013eaedf669612566a97bce1 Mon Sep 17 00:00:00 2001
From: Tom Honermann
Date: Thu, 22 Aug 2024 09:44:56 -0700
Subject: [PATCH] [Clang] Support for MSVC compatible header search path
orde
https://github.com/tahonermann updated
https://github.com/llvm/llvm-project/pull/105738
>From 21b213c319748567f469a64cb3627215d5787352 Mon Sep 17 00:00:00 2001
From: Tom Honermann
Date: Thu, 22 Aug 2024 09:44:56 -0700
Subject: [PATCH] [Clang] Support for MSVC compatible header search path
orde
https://github.com/tahonermann updated
https://github.com/llvm/llvm-project/pull/105738
>From 9dc8727fad50d7a808fc14173189105675cb46c9 Mon Sep 17 00:00:00 2001
From: Tom Honermann
Date: Thu, 22 Aug 2024 09:44:56 -0700
Subject: [PATCH] [Clang] Support for MSVC compatible header search path
orde
tahonermann wrote:
The static analysis tool produced a false positive; I see no reason for a
change. The static analyzer failed to recognize that `APValue::Kind` is
initialized to `None` during default construction of the `EvalResult` variable
and that it can't have changed by the time the var
tahonermann wrote:
The static analysis report was actually a (complicated) false positive. I see
no need to make a change.
https://github.com/llvm/llvm-project/pull/122339
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/
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.
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
tahonermann wrote:
Thanks for the link to that commit, @erichkeane, I'll push a fix shortly.
https://github.com/llvm/llvm-project/pull/120327
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co
https://github.com/tahonermann updated
https://github.com/llvm/llvm-project/pull/120327
>From 6ed96d3bf22c5da5af995ea5ffe083baf91594bb Mon Sep 17 00:00:00 2001
From: Tom Honermann
Date: Fri, 1 Nov 2024 16:03:24 -0700
Subject: [PATCH 01/10] [SYCL] Basic diagnostics for the
sycl_kernel_entry_poi
@@ -1550,6 +1550,8 @@ NamedDecl *Sema::ActOnNonTypeTemplateParameter(Scope *S,
Declarator &D,
IdResolver.AddDecl(Param);
}
+ ProcessDeclAttributes(S, Param, D);
tahonermann wrote:
Thanks, @AaronBallman.
See also [P3324 (Attributes for namespace alias
@@ -15978,6 +15988,24 @@ Decl *Sema::ActOnFinishFunctionBody(Decl *dcl, Stmt
*Body,
CheckCoroutineWrapper(FD);
}
+ // Diagnose invalid SYCL kernel entry point function declarations.
+ if (FD && !FD->isInvalidDecl() && !FD->isTemplated() &&
+ FD->hasAttr()) {
+
@@ -206,3 +208,124 @@ void SemaSYCL::handleKernelEntryPointAttr(Decl *D, const
ParsedAttr &AL) {
D->addAttr(::new (SemaRef.Context)
SYCLKernelEntryPointAttr(SemaRef.Context, AL, TSI));
}
+
+static SourceLocation SourceLocationForType(QualType QT) {
+ Source
@@ -15978,6 +15988,24 @@ Decl *Sema::ActOnFinishFunctionBody(Decl *dcl, Stmt
*Body,
CheckCoroutineWrapper(FD);
}
+ // Diagnose invalid SYCL kernel entry point function declarations.
+ if (FD && !FD->isInvalidDecl() && !FD->isTemplated() &&
tahonerma
https://github.com/tahonermann updated
https://github.com/llvm/llvm-project/pull/120327
>From 6ed96d3bf22c5da5af995ea5ffe083baf91594bb Mon Sep 17 00:00:00 2001
From: Tom Honermann
Date: Fri, 1 Nov 2024 16:03:24 -0700
Subject: [PATCH 1/9] [SYCL] Basic diagnostics for the sycl_kernel_entry_point
tahonermann wrote:
I've been continuing to work on this, but have yet to get all of our internal
tests to pass. I've reverted the PR to a draft pending successful internal
testing.
https://github.com/llvm/llvm-project/pull/105738
___
cfe-commits mail
https://github.com/tahonermann converted_to_draft
https://github.com/llvm/llvm-project/pull/105738
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/tahonermann approved this pull request.
The changes look good to me!
https://github.com/llvm/llvm-project/pull/121822
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/tahonermann edited
https://github.com/llvm/llvm-project/pull/121822
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/tahonermann edited
https://github.com/llvm/llvm-project/pull/121822
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -32,7 +31,7 @@ void SYCLInstallationDetector::addSYCLIncludeArgs(
// Unsupported options for SYCL device compilation.
static ArrayRef getUnsupportedOpts() {
- return {
+ static std::vector UnsupportedOpts = {
tahonermann wrote:
Declaring the function `co
https://github.com/tahonermann closed
https://github.com/llvm/llvm-project/pull/117268
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
tahonermann wrote:
@erichkeane, thank you for the review comments so far. I think I've addressed
or responded to all of them and I look forward to your next round of review. I
don't expect you to see this message until January 6th or so, so I hope you are
enjoying, or have enjoyed, the holiday
@@ -206,3 +208,124 @@ void SemaSYCL::handleKernelEntryPointAttr(Decl *D, const
ParsedAttr &AL) {
D->addAttr(::new (SemaRef.Context)
SYCLKernelEntryPointAttr(SemaRef.Context, AL, TSI));
}
+
+static SourceLocation SourceLocationForType(QualType QT) {
+ Source
@@ -15978,6 +15988,24 @@ Decl *Sema::ActOnFinishFunctionBody(Decl *dcl, Stmt
*Body,
CheckCoroutineWrapper(FD);
}
+ // Diagnose invalid SYCL kernel entry point function declarations.
+ if (FD && !FD->isInvalidDecl() && !FD->isTemplated() &&
tahonerma
https://github.com/tahonermann updated
https://github.com/llvm/llvm-project/pull/120327
>From 6ed96d3bf22c5da5af995ea5ffe083baf91594bb Mon Sep 17 00:00:00 2001
From: Tom Honermann
Date: Fri, 1 Nov 2024 16:03:24 -0700
Subject: [PATCH 1/8] [SYCL] Basic diagnostics for the sycl_kernel_entry_point
https://github.com/tahonermann updated
https://github.com/llvm/llvm-project/pull/120327
>From 6ed96d3bf22c5da5af995ea5ffe083baf91594bb Mon Sep 17 00:00:00 2001
From: Tom Honermann
Date: Fri, 1 Nov 2024 16:03:24 -0700
Subject: [PATCH 1/7] [SYCL] Basic diagnostics for the sycl_kernel_entry_point
@@ -206,3 +208,124 @@ void SemaSYCL::handleKernelEntryPointAttr(Decl *D, const
ParsedAttr &AL) {
D->addAttr(::new (SemaRef.Context)
SYCLKernelEntryPointAttr(SemaRef.Context, AL, TSI));
}
+
+static SourceLocation SourceLocationForType(QualType QT) {
+ Source
@@ -1134,8 +1134,18 @@ void ASTDeclReader::VisitFunctionDecl(FunctionDecl *FD) {
// the presence of a sycl_kernel_entry_point attribute, register it so that
// associated metadata is recreated.
if (FD->hasAttr()) {
+const auto *SKEPAttr = FD->getAttr();
ASTContex
@@ -206,3 +208,124 @@ void SemaSYCL::handleKernelEntryPointAttr(Decl *D, const
ParsedAttr &AL) {
D->addAttr(::new (SemaRef.Context)
SYCLKernelEntryPointAttr(SemaRef.Context, AL, TSI));
}
+
+static SourceLocation SourceLocationForType(QualType QT) {
+ Source
@@ -206,3 +208,124 @@ void SemaSYCL::handleKernelEntryPointAttr(Decl *D, const
ParsedAttr &AL) {
D->addAttr(::new (SemaRef.Context)
SYCLKernelEntryPointAttr(SemaRef.Context, AL, TSI));
}
+
+static SourceLocation SourceLocationForType(QualType QT) {
+ Source
@@ -206,3 +208,124 @@ void SemaSYCL::handleKernelEntryPointAttr(Decl *D, const
ParsedAttr &AL) {
D->addAttr(::new (SemaRef.Context)
SYCLKernelEntryPointAttr(SemaRef.Context, AL, TSI));
}
+
+static SourceLocation SourceLocationForType(QualType QT) {
+ Source
@@ -206,3 +208,124 @@ void SemaSYCL::handleKernelEntryPointAttr(Decl *D, const
ParsedAttr &AL) {
D->addAttr(::new (SemaRef.Context)
SYCLKernelEntryPointAttr(SemaRef.Context, AL, TSI));
}
+
+static SourceLocation SourceLocationForType(QualType QT) {
+ Source
@@ -15978,6 +15988,24 @@ Decl *Sema::ActOnFinishFunctionBody(Decl *dcl, Stmt
*Body,
CheckCoroutineWrapper(FD);
}
+ // Diagnose invalid SYCL kernel entry point function declarations.
+ if (FD && !FD->isInvalidDecl() && !FD->isTemplated() &&
+ FD->hasAttr()) {
+
@@ -12408,6 +12408,29 @@ def err_sycl_special_type_num_init_method : Error<
"types with 'sycl_special_class' attribute must have one and only one
'__init' "
"method defined">;
+// SYCL kernel entry point diagnostics
+def err_sycl_entry_point_invalid : Error<
+ "'sycl_ker
@@ -12408,6 +12408,29 @@ def err_sycl_special_type_num_init_method : Error<
"types with 'sycl_special_class' attribute must have one and only one
'__init' "
"method defined">;
+// SYCL kernel entry point diagnostics
+def err_sycl_entry_point_invalid : Error<
+ "'sycl_ker
https://github.com/tahonermann updated
https://github.com/llvm/llvm-project/pull/120327
>From 6ed96d3bf22c5da5af995ea5ffe083baf91594bb Mon Sep 17 00:00:00 2001
From: Tom Honermann
Date: Fri, 1 Nov 2024 16:03:24 -0700
Subject: [PATCH 1/6] [SYCL] Basic diagnostics for the sycl_kernel_entry_point
https://github.com/tahonermann updated
https://github.com/llvm/llvm-project/pull/120327
>From 6ed96d3bf22c5da5af995ea5ffe083baf91594bb Mon Sep 17 00:00:00 2001
From: Tom Honermann
Date: Fri, 1 Nov 2024 16:03:24 -0700
Subject: [PATCH 1/4] [SYCL] Basic diagnostics for the sycl_kernel_entry_point
https://github.com/tahonermann updated
https://github.com/llvm/llvm-project/pull/120327
>From 6ed96d3bf22c5da5af995ea5ffe083baf91594bb Mon Sep 17 00:00:00 2001
From: Tom Honermann
Date: Fri, 1 Nov 2024 16:03:24 -0700
Subject: [PATCH 1/3] [SYCL] Basic diagnostics for the sycl_kernel_entry_point
@@ -15978,6 +15988,24 @@ Decl *Sema::ActOnFinishFunctionBody(Decl *dcl, Stmt
*Body,
CheckCoroutineWrapper(FD);
}
+ // Diagnose invalid SYCL kernel entry point function declarations.
+ if (FD && !FD->isInvalidDecl() && !FD->isTemplated() &&
tahonerma
@@ -206,3 +208,124 @@ void SemaSYCL::handleKernelEntryPointAttr(Decl *D, const
ParsedAttr &AL) {
D->addAttr(::new (SemaRef.Context)
SYCLKernelEntryPointAttr(SemaRef.Context, AL, TSI));
}
+
+static SourceLocation SourceLocationForType(QualType QT) {
+ Source
@@ -206,3 +208,124 @@ void SemaSYCL::handleKernelEntryPointAttr(Decl *D, const
ParsedAttr &AL) {
D->addAttr(::new (SemaRef.Context)
SYCLKernelEntryPointAttr(SemaRef.Context, AL, TSI));
}
+
+static SourceLocation SourceLocationForType(QualType QT) {
+ Source
https://github.com/tahonermann edited
https://github.com/llvm/llvm-project/pull/120327
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -206,3 +208,124 @@ void SemaSYCL::handleKernelEntryPointAttr(Decl *D, const
ParsedAttr &AL) {
D->addAttr(::new (SemaRef.Context)
SYCLKernelEntryPointAttr(SemaRef.Context, AL, TSI));
}
+
+static SourceLocation SourceLocationForType(QualType QT) {
+ Source
@@ -206,3 +208,124 @@ void SemaSYCL::handleKernelEntryPointAttr(Decl *D, const
ParsedAttr &AL) {
D->addAttr(::new (SemaRef.Context)
SYCLKernelEntryPointAttr(SemaRef.Context, AL, TSI));
}
+
+static SourceLocation SourceLocationForType(QualType QT) {
+ Source
1 - 100 of 371 matches
Mail list logo