@@ -65,7 +65,7 @@ class CXXFieldCollector {
/// getCurFields - Pointer to array of fields added to the currently parsed
/// class.
- FieldDecl **getCurFields() { return &*(Fields.end() - getCurNumFields()); }
Keenuts wrote:
Thanks for the review and link
https://github.com/Keenuts edited
https://github.com/llvm/llvm-project/pull/70193
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Keenuts closed
https://github.com/llvm/llvm-project/pull/70193
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Keenuts edited
https://github.com/llvm/llvm-project/pull/76749
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1328,6 +1331,31 @@ VersionTuple Triple::getDriverKitVersion() const {
}
}
+VersionTuple Triple::getVulkanVersion() const {
+ if (getArch() != spirv || getOS() != Vulkan)
+llvm_unreachable("invalid Vulkan SPIR-V triple");
+
+ VersionTuple VulkanVersion = getOSVersio
@@ -4236,20 +4236,35 @@ bool CompilerInvocation::ParseLangArgs(LangOptions
&Opts, ArgList &Args,
// TODO: Revisit restricting SPIR-V to logical once we've figured out how
to
// handle PhysicalStorageBuffer64 memory model
if (T.isDXIL() || T.isSPIRVLogical()) {
-
@@ -3,29 +3,39 @@
// Supported targets
//
// RUN: %clang -target dxil-unknown-shadermodel6.2-compute %s -S -o /dev/null
2>&1 | FileCheck --allow-empty --check-prefix=CHECK-VALID %s
-// RUN: %clang -target spirv-unknown-shadermodel6.2-compute %s -S -o /dev/null
2>&1 | FileChec
https://github.com/Keenuts commented:
LGTM for the logic, and choices. Just some small nits
https://github.com/llvm/llvm-project/pull/76749
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm
https://github.com/Keenuts approved this pull request.
https://github.com/llvm/llvm-project/pull/76749
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Keenuts updated
https://github.com/llvm/llvm-project/pull/80680
From 818ccfd0258602fdd0630823bb2b8af0507749d5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nathan=20Gau=C3=ABr?=
Date: Fri, 2 Feb 2024 16:38:46 +0100
Subject: [PATCH 1/6] [clang][HLSL][SPRI-V] Add convergence intrins
@@ -1295,11 +1295,13 @@ double4 trunc(double4);
/// true, across all active lanes in the current wave.
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_count_bits)
+__attribute__((convergent))
Keenuts wrote:
@llvm-beanz FYI.
https://github.com/Keenuts updated
https://github.com/llvm/llvm-project/pull/80680
From 818ccfd0258602fdd0630823bb2b8af0507749d5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nathan=20Gau=C3=ABr?=
Date: Fri, 2 Feb 2024 16:38:46 +0100
Subject: [PATCH 1/7] [clang][HLSL][SPRI-V] Add convergence intrins
@@ -1295,11 +1295,13 @@ double4 trunc(double4);
/// true, across all active lanes in the current wave.
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_count_bits)
+__attribute__((convergent))
Keenuts wrote:
Right, so in that
https://github.com/Keenuts updated
https://github.com/llvm/llvm-project/pull/80680
From afbe709931942b3970f92884022e250c1e7eb84f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nathan=20Gau=C3=ABr?=
Date: Fri, 2 Feb 2024 16:38:46 +0100
Subject: [PATCH 1/8] [clang][HLSL][SPRI-V] Add convergence intrins
Keenuts wrote:
Rebases on main (almost, HEAD is slightly broken), and added back the
convergence attribute.
The backend changes are ready for this intrinsic.
https://github.com/llvm/llvm-project/pull/80680
___
cfe-commits mailing list
cfe-commits@list
Keenuts wrote:
@arsenm would you be fine with those codegen changes as-is? Given that the
convergent/no-convergent switch will be done later, depending on when the
required IR change is merged?
https://github.com/llvm/llvm-project/pull/80680
___
cfe-
Keenuts wrote:
@ssahasra it is up to you then 😊
https://github.com/llvm/llvm-project/pull/80680
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Keenuts edited
https://github.com/llvm/llvm-project/pull/80680
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Keenuts updated
https://github.com/llvm/llvm-project/pull/80680
From afbe709931942b3970f92884022e250c1e7eb84f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nathan=20Gau=C3=ABr?=
Date: Fri, 2 Feb 2024 16:38:46 +0100
Subject: [PATCH 1/9] [clang][HLSL][SPRI-V] Add convergence intrins
@@ -1130,8 +1130,92 @@ struct BitTest {
static BitTest decodeBitTestBuiltin(unsigned BuiltinID);
};
+
+// Returns the first convergence entry/loop/anchor instruction found in |BB|.
+// std::nullptr otherwise.
+llvm::IntrinsicInst *getConvergenceToken(llvm::BasicBlock *BB) {
Keenuts wrote:
Thanks all the the reviews! We have 3 LGTMs and an ack from Arsenm, so I'm
going to rebase on main, wait for the bots & tests, and if all is green, merge
this.
https://github.com/llvm/llvm-project/pull/80680
___
cfe-commits mailing lis
https://github.com/Keenuts updated
https://github.com/llvm/llvm-project/pull/80680
From dc008167980ca0a479d2cdceeeb1ab6cd4983ec3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nathan=20Gau=C3=ABr?=
Date: Fri, 2 Feb 2024 16:38:46 +0100
Subject: [PATCH 1/9] [clang][HLSL][SPRI-V] Add convergence intrins
Keenuts wrote:
Local tests for SPIR-V & DXIL pass
https://github.com/llvm/llvm-project/pull/80680
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Keenuts closed
https://github.com/llvm/llvm-project/pull/80680
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Keenuts wrote:
Hi! Thanks @farzonl and @marcauberer for making sure SPIR-V backend didn't
break, really appreciate it! 😊
https://github.com/llvm/llvm-project/pull/87131
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi
@@ -0,0 +1,44 @@
+
+//===- CGHLSLUtils.h - Utility functions for HLSL CodeGen ---*- 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: A
@@ -0,0 +1,95 @@
+; RUN: llc -O0 -mtriple=spirv-unknown-unknown %s -o - | FileCheck %s
+; Note: The validator is wrong it wants the return to be a bool vector when it
is bool scalar return
Keenuts wrote:
AFAIK the validator is not wrong, it complains for 2 reaso
@@ -100,6 +100,118 @@ double3 abs(double3);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_abs)
double4 abs(double4);
+//===--===//
+// all builtins
+//===---
@@ -0,0 +1,44 @@
+
+//===- CGHLSLUtils.h - Utility functions for HLSL CodeGen ---*- 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: A
@@ -0,0 +1,44 @@
+
+//===- CGHLSLUtils.h - Utility functions for HLSL CodeGen ---*- 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: A
https://github.com/Keenuts edited
https://github.com/llvm/llvm-project/pull/87171
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Keenuts edited
https://github.com/llvm/llvm-project/pull/87171
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Keenuts approved this pull request.
https://github.com/llvm/llvm-project/pull/81038
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Keenuts updated
https://github.com/llvm/llvm-project/pull/80680
From 818ccfd0258602fdd0630823bb2b8af0507749d5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nathan=20Gau=C3=ABr?=
Date: Fri, 2 Feb 2024 16:38:46 +0100
Subject: [PATCH 1/3] [clang][HLSL][SPRI-V] Add convergence intrins
https://github.com/Keenuts ready_for_review
https://github.com/llvm/llvm-project/pull/80680
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Keenuts wrote:
Hi, thanks for the reviews so far!
I believe we are ready to move forward on our side. Adding @llvm-beanz for the
HLSL part.
The builtin I added is mostly to get something we can generate those intrinsics
for. I am fine changing the name, or the implementation around it, it's jus
@@ -1130,8 +1130,96 @@ struct BitTest {
static BitTest decodeBitTestBuiltin(unsigned BuiltinID);
};
+
+// Returns the first convergence entry/loop/anchor instruction found in |BB|.
+// std::nullopt otherwise.
+std::optional getConvergenceToken(llvm::BasicBlock *BB)
{
--
@@ -1130,8 +1130,96 @@ struct BitTest {
static BitTest decodeBitTestBuiltin(unsigned BuiltinID);
};
+
+// Returns the first convergence entry/loop/anchor instruction found in |BB|.
+// std::nullopt otherwise.
+std::optional getConvergenceToken(llvm::BasicBlock *BB)
{
+ for
@@ -1130,8 +1130,96 @@ struct BitTest {
static BitTest decodeBitTestBuiltin(unsigned BuiltinID);
};
+
+// Returns the first convergence entry/loop/anchor instruction found in |BB|.
+// std::nullopt otherwise.
+std::optional getConvergenceToken(llvm::BasicBlock *BB)
{
+ for
@@ -1130,8 +1130,96 @@ struct BitTest {
static BitTest decodeBitTestBuiltin(unsigned BuiltinID);
};
+
+// Returns the first convergence entry/loop/anchor instruction found in |BB|.
+// std::nullopt otherwise.
+std::optional getConvergenceToken(llvm::BasicBlock *BB)
{
+ for
@@ -1130,8 +1130,96 @@ struct BitTest {
static BitTest decodeBitTestBuiltin(unsigned BuiltinID);
};
+
+// Returns the first convergence entry/loop/anchor instruction found in |BB|.
+// std::nullopt otherwise.
+std::optional getConvergenceToken(llvm::BasicBlock *BB)
{
+ for
@@ -5686,6 +5686,10 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo
&CallInfo,
if (!CI->getType()->isVoidTy())
CI->setName("call");
+ if (getTarget().getTriple().isSPIRVLogical() &&
+ CI->getCalledFunction()->isConvergent())
Keenuts wrote
https://github.com/Keenuts updated
https://github.com/llvm/llvm-project/pull/80680
From 818ccfd0258602fdd0630823bb2b8af0507749d5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nathan=20Gau=C3=ABr?=
Date: Fri, 2 Feb 2024 16:38:46 +0100
Subject: [PATCH 1/4] [clang][HLSL][SPRI-V] Add convergence intrins
@@ -4554,6 +4554,13 @@ def HLSLWaveActiveCountBits : LangBuiltin<"HLSL_LANG"> {
let Prototype = "unsigned int(bool)";
}
+// HLSL
+def HLSLWaveGetLaneIndex : LangBuiltin<"HLSL_LANG"> {
+ let Spellings = ["__builtin_hlsl_wave_get_lane_index"];
+ let Attributes = [NoThrow, Co
https://github.com/Keenuts updated
https://github.com/llvm/llvm-project/pull/80680
From 818ccfd0258602fdd0630823bb2b8af0507749d5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nathan=20Gau=C3=ABr?=
Date: Fri, 2 Feb 2024 16:38:46 +0100
Subject: [PATCH 1/5] [clang][HLSL][SPRI-V] Add convergence intrins
@@ -1297,5 +1297,10 @@ _HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_count_bits)
uint WaveActiveCountBits(bool Val);
+/// \brief Returns the index of the current lane within the current wave.
+_HLSL_AVAILABILITY(shadermodel, 6.0)
+_HLSL_BU
@@ -1130,8 +1130,96 @@ struct BitTest {
static BitTest decodeBitTestBuiltin(unsigned BuiltinID);
};
+
+// Returns the first convergence entry/loop/anchor instruction found in |BB|.
+// std::nullopt otherwise.
+std::optional getConvergenceToken(llvm::BasicBlock *BB)
{
+ for
https://github.com/Keenuts created
https://github.com/llvm/llvm-project/pull/80680
HLSL has wave operations and other kind of function which required the control
flow to either be converged, or respect certain constraints as where and how to
re-converge.
At the HLSL level, the convergence are
https://github.com/Keenuts approved this pull request.
https://github.com/llvm/llvm-project/pull/78611
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Keenuts created
https://github.com/llvm/llvm-project/pull/70193
This was found by doing bound-checking on SmallVector iterator usage. When the
count is 0, the end iterator is dereferenced to get its address. This doesn't
seem to be an issue in practice as most of the time, a
Keenuts wrote:
CI seems OK, except clang format which complains about an unrelated line.
Marking as ready.
https://github.com/llvm/llvm-project/pull/70193
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/l
https://github.com/Keenuts ready_for_review
https://github.com/llvm/llvm-project/pull/70193
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Keenuts edited
https://github.com/llvm/llvm-project/pull/70193
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Keenuts edited
https://github.com/llvm/llvm-project/pull/70330
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2,8 +2,8 @@
// Supported targets
//
-// RUN: %clang -target dxil-unknown-shadermodel6.2-pixel %s -S -o /dev/null
2>&1 | FileCheck --check-prefix=CHECK-VALID %s
-// RUN: %clang -target spirv-unknown-shadermodel6.2-library %s -S -o /dev/null
2>&1 | FileCheck --check-prefix
https://github.com/Keenuts commented:
One question, otherwise LGTM, thanks for this!
https://github.com/llvm/llvm-project/pull/70330
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2,8 +2,8 @@
// Supported targets
//
-// RUN: %clang -target dxil-unknown-shadermodel6.2-pixel %s -S -o /dev/null
2>&1 | FileCheck --check-prefix=CHECK-VALID %s
-// RUN: %clang -target spirv-unknown-shadermodel6.2-library %s -S -o /dev/null
2>&1 | FileCheck --check-prefix
https://github.com/Keenuts approved this pull request.
https://github.com/llvm/llvm-project/pull/70330
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2,8 +2,8 @@
// Supported targets
//
-// RUN: %clang -target dxil-unknown-shadermodel6.2-pixel %s -S -o /dev/null
2>&1 | FileCheck --check-prefix=CHECK-VALID %s
-// RUN: %clang -target spirv-unknown-shadermodel6.2-library %s -S -o /dev/null
2>&1 | FileCheck --check-prefix
Author: Nathan Gauër
Date: 2023-09-11T10:15:24+02:00
New Revision: 53b6a169e453a2a91d3713ca16fa089853c670a8
URL:
https://github.com/llvm/llvm-project/commit/53b6a169e453a2a91d3713ca16fa089853c670a8
DIFF:
https://github.com/llvm/llvm-project/commit/53b6a169e453a2a91d3713ca16fa089853c670a8.diff
https://github.com/Keenuts review_requested
https://github.com/llvm/llvm-project/pull/65989
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1129,8 +1129,97 @@ struct BitTest {
static BitTest decodeBitTestBuiltin(unsigned BuiltinID);
};
+
+// Returns the first convergence entry/loop/anchor instruction found in |BB|.
+// std::nullopt otherwise.
+std::optional getConvergenceToken(llvm::BasicBlock *BB)
{
+ for
https://github.com/Keenuts updated
https://github.com/llvm/llvm-project/pull/80680
From f43134787dc5b1120e3722e03028d0071de22331 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nathan=20Gau=C3=ABr?=
Date: Fri, 2 Feb 2024 16:38:46 +0100
Subject: [PATCH 1/2] [clang][HLSL][SPRI-V] Add convergence intrins
https://github.com/Keenuts updated
https://github.com/llvm/llvm-project/pull/80680
From f43134787dc5b1120e3722e03028d0071de22331 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nathan=20Gau=C3=ABr?=
Date: Fri, 2 Feb 2024 16:38:46 +0100
Subject: [PATCH 1/2] [clang][HLSL][SPRI-V] Add convergence intrins
https://github.com/Keenuts approved this pull request.
LGTM on the SPIR-V side, leaving MS look at the HLSL side
https://github.com/llvm/llvm-project/pull/97111
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mail
Keenuts wrote:
Merging to unblock the structurizer work.
Let me know if you had a specific SEMA check in mind to add in the end!
https://github.com/llvm/llvm-project/pull/103299
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm
https://github.com/Keenuts closed
https://github.com/llvm/llvm-project/pull/103299
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,1410 @@
+//===-- SPIRVStructurizer.cpp --*- 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: Apache-2.0 WITH
@@ -0,0 +1,1410 @@
+//===-- SPIRVStructurizer.cpp --*- 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: Apache-2.0 WITH
@@ -0,0 +1,1410 @@
+//===-- SPIRVStructurizer.cpp --*- 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: Apache-2.0 WITH
@@ -0,0 +1,1410 @@
+//===-- SPIRVStructurizer.cpp --*- 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: Apache-2.0 WITH
@@ -0,0 +1,1410 @@
+//===-- SPIRVStructurizer.cpp --*- 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: Apache-2.0 WITH
@@ -0,0 +1,1410 @@
+//===-- SPIRVStructurizer.cpp --*- 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: Apache-2.0 WITH
https://github.com/Keenuts edited
https://github.com/llvm/llvm-project/pull/107408
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Keenuts deleted
https://github.com/llvm/llvm-project/pull/107408
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,1410 @@
+//===-- SPIRVStructurizer.cpp --*- 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: Apache-2.0 WITH
@@ -0,0 +1,1410 @@
+//===-- SPIRVStructurizer.cpp --*- 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: Apache-2.0 WITH
@@ -744,79 +744,139 @@ static void insertSpirvDecorations(MachineFunction &MF,
MachineIRBuilder MIB) {
MI->eraseFromParent();
}
-// Find basic blocks of the switch and replace registers in spv_switch() by its
-// MBB equivalent.
-static void processSwitches(MachineFunctio
@@ -744,79 +744,139 @@ static void insertSpirvDecorations(MachineFunction &MF,
MachineIRBuilder MIB) {
MI->eraseFromParent();
}
-// Find basic blocks of the switch and replace registers in spv_switch() by its
-// MBB equivalent.
-static void processSwitches(MachineFunctio
@@ -0,0 +1,1410 @@
+//===-- SPIRVStructurizer.cpp --*- 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: Apache-2.0 WITH
@@ -0,0 +1,1410 @@
+//===-- SPIRVStructurizer.cpp --*- 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: Apache-2.0 WITH
@@ -0,0 +1,1410 @@
+//===-- SPIRVStructurizer.cpp --*- 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: Apache-2.0 WITH
@@ -0,0 +1,1410 @@
+//===-- SPIRVStructurizer.cpp --*- 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: Apache-2.0 WITH
Keenuts wrote:
Given the ongoing discussion around spirv-sim, I updated all the hlsl tests to
be llvm-ir -> SPIR-V tests. All tests now use both FileCheck and spirv-sim.
https://github.com/llvm/llvm-project/pull/107408
___
cfe-commits mailing list
cf
@@ -744,79 +744,139 @@ static void insertSpirvDecorations(MachineFunction &MF,
MachineIRBuilder MIB) {
MI->eraseFromParent();
}
-// Find basic blocks of the switch and replace registers in spv_switch() by its
-// MBB equivalent.
-static void processSwitches(MachineFunctio
https://github.com/Keenuts created
https://github.com/llvm/llvm-project/pull/103299
This commits add the WaveIsFirstLane() hlsl intrinsinc. This intrinsic uses the
convergence intrinsincs for the SPIR-V backend. On the DXIL side, I'm not sure
what the strategy is. (DXC didn't used convergence
Keenuts wrote:
> We have this work tracked here: #99158
>
> there should be some dxil specific tasks.
Seems like most boxes are checked, except Sema checks:
- what kind of Sema checks would be required for this one?
Also, the intrinsic name in the issue is using camel case vs snake case for
t
Keenuts wrote:
> > We have this work tracked here: #99158
> > there should be some dxil specific tasks.
>
> Seems like most boxes would be checked by this PR, except Sema checks:
>
> * what kind of Sema checks would be required for this one?
> Also, the intrinsic name in the issue is using ca
Keenuts wrote:
> This commits add the WaveIsFirstLane() hlsl intrinsinc. This intrinsic uses
> the convergence intrinsincs for the SPIR-V backend. On the DXIL side, I'm not
> sure what the strategy is so this is implemented like in DXC: a simple
> builtin function. (DXC didn't used convergence
https://github.com/Keenuts edited
https://github.com/llvm/llvm-project/pull/103299
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Keenuts approved this pull request.
Thanks!
https://github.com/llvm/llvm-project/pull/95849
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Keenuts approved this pull request.
https://github.com/llvm/llvm-project/pull/88455
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Keenuts approved this pull request.
https://github.com/llvm/llvm-project/pull/88325
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Keenuts created
https://github.com/llvm/llvm-project/pull/88918
PR #80680 added bits in the codegen to lazily add convergence intrinsics when
required. This logic relied on the LoopStack. The issue is when parsing the
condition, the loopstack doesn't yet reflect the correct
@@ -4987,7 +4990,11 @@ class CodeGenFunction : public CodeGenTypeCache {
const llvm::Twine &Name = "");
// Adds a convergence_ctrl token to |Input| and emits the required parent
// convergence instructions.
- llvm::CallBase *addControll
https://github.com/Keenuts updated
https://github.com/llvm/llvm-project/pull/88918
From 94d76dcdfac88d1d50fe705406c0280c33766e15 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nathan=20Gau=C3=ABr?=
Date: Mon, 15 Apr 2024 17:05:40 +0200
Subject: [PATCH 1/2] [clang][SPIR-V] Always add convervence intri
Keenuts wrote:
Thanks all!
Agree with Bogner, let's unblock the tests first.
As for the address space for globals, this isn't something we have looked into
yet, so I'd be in favor of keeping the same behavior as the SPIRN flavor until
we have a reason to diverge (as in "thought about this issue
@@ -1109,6 +1124,10 @@ void CodeGenFunction::EmitForStmt(const ForStmt &S,
llvm::BasicBlock *CondBlock = CondDest.getBlock();
EmitBlock(CondBlock);
+ if (getTarget().getTriple().isSPIRVLogical())
Keenuts wrote:
Right, something at the module level, which
https://github.com/Keenuts updated
https://github.com/llvm/llvm-project/pull/88918
From 94d76dcdfac88d1d50fe705406c0280c33766e15 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nathan=20Gau=C3=ABr?=
Date: Mon, 15 Apr 2024 17:05:40 +0200
Subject: [PATCH 1/3] [clang][SPIR-V] Always add convervence intri
@@ -1109,6 +1124,10 @@ void CodeGenFunction::EmitForStmt(const ForStmt &S,
llvm::BasicBlock *CondBlock = CondDest.getBlock();
EmitBlock(CondBlock);
+ if (getTarget().getTriple().isSPIRVLogical())
Keenuts wrote:
Changed those for a module-level function w
1 - 100 of 223 matches
Mail list logo