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
@@ -1550,6 +1550,8 @@ NamedDecl *Sema::ActOnNonTypeTemplateParameter(Scope *S,
Declarator &D,
IdResolver.AddDecl(Param);
}
+ ProcessDeclAttributes(S, Param, D);
tahonermann wrote:
This was needed to ensure diagnostics were issued for a few of the test
@@ -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
@@ -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 commented:
Responses to Erich's comments. Thanks, Erich!
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
@@ -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
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/2] [SYCL] Basic diagnostics for the sycl_kernel_entry_point
https://github.com/tahonermann created
https://github.com/llvm/llvm-project/pull/120327
The `sycl_kernel_entry_point` attribute is used to declare a function that
defines a pattern for an offload kernel entry point. The attribute requires a
single type argument that specifies a class type that
tahonermann wrote:
@MaskRay, could you please take a look at this PR and give it your stamp of
approval if you have no concerns?
https://github.com/llvm/llvm-project/pull/117268
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llv
tahonermann wrote:
Is it known which platforms are affected by this issue? I ask because I see
some issues with how consoles/terminals are handled by `raw_fd_ostream`.
On Windows, `raw_fd_ostream` has a `bool` data member named `IsWindowsConsole`
that is intended to indicate whether `FD` is a
@@ -3190,19 +3190,27 @@ static void GenerateHeaderSearchArgs(const
HeaderSearchOptions &Opts,
auto It = Opts.UserEntries.begin();
auto End = Opts.UserEntries.end();
- // Add -I... and -F... options in order.
- for (; It < End && Matches(*It, {frontend::Angled}, std::nul
https://github.com/tahonermann updated
https://github.com/llvm/llvm-project/pull/105738
>From 8ecdbe842c2e42be9247788ed16d6021e9488f19 Mon Sep 17 00:00:00 2001
From: Tom Honermann
Date: Thu, 22 Aug 2024 09:44:56 -0700
Subject: [PATCH 1/2] [Clang] Match MSVC handling of duplicate header search
https://github.com/tahonermann updated
https://github.com/llvm/llvm-project/pull/105738
>From d5c7035fd0c007e9833150a3d1b0a86d8744aa5d Mon Sep 17 00:00:00 2001
From: Tom Honermann
Date: Thu, 22 Aug 2024 09:44:56 -0700
Subject: [PATCH 1/2] [Clang] Match MSVC handling of duplicate header search
https://github.com/tahonermann edited
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
@@ -6591,6 +6681,18 @@ const ToolChain &Driver::getOffloadingDeviceToolChain(
HostTC, Args);
break;
}
+case Action::OFK_SYCL:
+ switch (Target.getArch()) {
+ case llvm::Triple::spir:
+ case
https://github.com/tahonermann approved this pull request.
Thanks, @mdtoguchi, this looks good to me!
https://github.com/llvm/llvm-project/pull/117268
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listin
@@ -501,6 +501,7 @@ class PreambleThread {
}
{
+std::unique_lock Lock(Mutex);
WithContext Guard(std::move(CurrentReq->Ctx));
tahonermann wrote:
Per private discussion, we determined that there isn't actually a bug here so
long as
https://github.com/tahonermann requested changes to this pull request.
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
@@ -6591,6 +6681,18 @@ const ToolChain &Driver::getOffloadingDeviceToolChain(
HostTC, Args);
break;
}
+case Action::OFK_SYCL:
+ switch (Target.getArch()) {
+ case llvm::Triple::spir:
+ case
@@ -0,0 +1,179 @@
+//===--- SYCL.cpp - SYCL Tool and ToolChain Implementations -*- 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: Ap
https://github.com/tahonermann requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/118664
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -501,6 +501,7 @@ class PreambleThread {
}
{
+std::unique_lock Lock(Mutex);
WithContext Guard(std::move(CurrentReq->Ctx));
tahonermann wrote:
Unfortunately, I don't think this solves the issue by itself. Just prior to
exiting t
https://github.com/tahonermann requested changes to this pull request.
How did you decide on `IndexContents::All` as the default initialization value.
I would be more inclined towards `IndexContents::None`.
I think it would be preferred to use a member initializer in the declaration of
`IdxCon
@@ -6782,16 +6783,21 @@ defm : FlangIgnoredDiagOpt<"frontend-loop-interchange">;
defm : FlangIgnoredDiagOpt<"target-lifetime">;
// C++ SYCL options
+let Group = sycl_Group in {
def fsycl : Flag<["-"], "fsycl">,
- Visibility<[ClangOption, CLOption]>,
- Group, HelpText<"Enabl
@@ -0,0 +1,179 @@
+//===--- SYCL.cpp - SYCL Tool and ToolChain Implementations -*- 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: Ap
https://github.com/tahonermann commented:
This is looking good to me. I added some questions and noted a couple of
potential concerns for which I'm not well equipped to have an opinion on.
Perhaps others can offer their thoughts on those.
https://github.com/llvm/llvm-project/pull/117268
__
@@ -6591,6 +6681,18 @@ const ToolChain &Driver::getOffloadingDeviceToolChain(
HostTC, Args);
break;
}
+case Action::OFK_SYCL:
+ switch (Target.getArch()) {
+ case llvm::Triple::spir:
+ case
@@ -0,0 +1,179 @@
+//===--- SYCL.cpp - SYCL Tool and ToolChain Implementations -*- 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: Ap
https://github.com/tahonermann edited
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
@@ -6774,16 +6775,20 @@ defm : FlangIgnoredDiagOpt<"frontend-loop-interchange">;
defm : FlangIgnoredDiagOpt<"target-lifetime">;
// C++ SYCL options
+let Group = sycl_Group in {
def fsycl : Flag<["-"], "fsycl">,
- Visibility<[ClangOption, CLOption]>,
- Group, HelpText<"Enabl
@@ -6774,16 +6775,20 @@ defm : FlangIgnoredDiagOpt<"frontend-loop-interchange">;
defm : FlangIgnoredDiagOpt<"target-lifetime">;
// C++ SYCL options
+let Group = sycl_Group in {
def fsycl : Flag<["-"], "fsycl">,
- Visibility<[ClangOption, CLOption]>,
- Group, HelpText<"Enabl
@@ -6592,6 +6672,19 @@ const ToolChain &Driver::getOffloadingDeviceToolChain(
HostTC, Args);
break;
}
+case Action::OFK_SYCL:
+ switch (Target.getArch()) {
+ case llvm::Triple::spir:
+ case
@@ -0,0 +1,183 @@
+//===--- SYCL.cpp - SYCL Tool and ToolChain Implementations -*- 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: Ap
@@ -0,0 +1,202 @@
+//===--- SYCL.cpp - SYCL Tool and ToolChain Implementations -*- 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: Ap
@@ -582,6 +582,10 @@ class Driver {
/// @name Helper Methods
/// @{
+ /// getSYCLDeviceTriple - Returns the SYCL device triple for the
+ /// specified ArchType.
+ llvm::Triple getSYCLDeviceTriple(StringRef TargetArch = "spir64") const;
tahonermann wrote
@@ -138,6 +142,7 @@ class LLVM_LIBRARY_VISIBILITY MSVCToolChain : public
ToolChain {
llvm::ToolsetLayout VSLayout = llvm::ToolsetLayout::OlderVS;
LazyDetector CudaInstallation;
LazyDetector RocmInstallation;
+ SYCLInstallationDetector SYCLInstallation;
https://github.com/tahonermann commented:
I was late to re-review these changes before they landed. However, since the
changes have been reverted, I took the opportunity to review again and I have a
number of concerns that I would like to see addressed before these changes land
again. Though I
@@ -0,0 +1,183 @@
+//===--- SYCL.cpp - SYCL Tool and ToolChain Implementations -*- 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: Ap
@@ -6774,16 +6775,20 @@ defm : FlangIgnoredDiagOpt<"frontend-loop-interchange">;
defm : FlangIgnoredDiagOpt<"target-lifetime">;
// C++ SYCL options
+let Group = sycl_Group in {
def fsycl : Flag<["-"], "fsycl">,
- Visibility<[ClangOption, CLOption]>,
- Group, HelpText<"Enabl
@@ -5176,11 +5183,34 @@ void Clang::ConstructJob(Compilation &C, const
JobAction &JA,
if (const Arg *PF = Args.getLastArg(options::OPT_mprintf_kind_EQ))
PF->claim();
- if (Args.hasFlag(options::OPT_fsycl, options::OPT_fno_sycl, false)) {
-CmdArgs.push_back("-fsycl-
@@ -288,6 +289,7 @@ class LLVM_LIBRARY_VISIBILITY Generic_GCC : public
ToolChain {
GCCInstallationDetector GCCInstallation;
LazyDetector CudaInstallation;
LazyDetector RocmInstallation;
+ SYCLInstallationDetector SYCLInstallation;
tahonermann wrote:
A
https://github.com/tahonermann edited
https://github.com/llvm/llvm-project/pull/107493
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
tahonermann wrote:
Further internal testing has indicated that there will likely be backward
compatibility problems in practice with the implemented approach of
differentiating behavior based on `-fms-compatibility`. I'm therefore going to
look into adding a new `-cc1` option, `-fms-header-sea
tahonermann wrote:
> Doesn't that impact whether a header is found via `""` or `<>` syntax? e.g.,
> if something went from a user header to a system header, I thought that meant
> the search order would then change depending on which include syntax you used?
No, those are orthogonal concerns,
tahonermann wrote:
Friendly ping for additional code review. @rnk, @nico, @zmodem, @majnemer,
@zygoloid.
The Windows build is failing spuriously. I've rebased and force pushed multiple
times to try to get a clean build, but it keeps failing during git checkout.
https://github.com/llvm/llvm-pr
tahonermann wrote:
Thanks, @AaronBallman,
> > Ideally, I think we would do the following at some point to improve
> > compatibility with MSVC.
>
> I'm not opposed, but I am concerned about the potential to subtly break user
> code that's relying on our current search path behavior. We may nee
https://github.com/tahonermann updated
https://github.com/llvm/llvm-project/pull/105738
>From d5c7035fd0c007e9833150a3d1b0a86d8744aa5d Mon Sep 17 00:00:00 2001
From: Tom Honermann
Date: Thu, 22 Aug 2024 09:44:56 -0700
Subject: [PATCH] [Clang] Match MSVC handling of duplicate header search paths
https://github.com/tahonermann updated
https://github.com/llvm/llvm-project/pull/105738
>From 35e3cb1c9901c365c0cd6225a61067987d6c40b8 Mon Sep 17 00:00:00 2001
From: Tom Honermann
Date: Thu, 22 Aug 2024 09:44:56 -0700
Subject: [PATCH] [Clang] Match MSVC handling of duplicate header search paths
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
https://github.com/tahonermann updated
https://github.com/llvm/llvm-project/pull/105738
>From a9b1711372a5f1a2294ba5f8b437a6020023a810 Mon Sep 17 00:00:00 2001
From: Tom Honermann
Date: Thu, 22 Aug 2024 09:44:56 -0700
Subject: [PATCH] [Clang] Match MSVC handling of duplicate header search paths
https://github.com/tahonermann updated
https://github.com/llvm/llvm-project/pull/105738
>From 14538f86fba30eec50e3a5a85c4e569af8435048 Mon Sep 17 00:00:00 2001
From: Tom Honermann
Date: Thu, 22 Aug 2024 09:44:56 -0700
Subject: [PATCH] [Clang] Match MSVC handling of duplicate header search paths
@@ -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_
1 - 100 of 316 matches
Mail list logo