python3kgae wrote:
> > Could this be an analysis pass which collect the list as a
> > SmallVector instead of creating the list in 'dx.exports'
> > metadata?
>
> You mean the DXILFinalizeLinkage pass (coming soon) that needs a list of
> entries and exported functions should get the information
https://github.com/python3kgae updated
https://github.com/llvm/llvm-project/pull/101240
>From c7a476a4d8b06e399e9c076cc15208871e1b5a25 Mon Sep 17 00:00:00 2001
From: Xiang Li
Date: Tue, 30 Jul 2024 16:34:40 -0400
Subject: [PATCH 1/5] [HLSL] AST support for WaveSize attribute.
First step for su
@@ -0,0 +1,25 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.8-library -x hlsl -ast-dump -o
- %s | FileCheck %s
+
+// CHECK-LABLE:FunctionDecl 0x{{[0-9a-f]+}} <{{.*}}> w0 'void ()'
+// CHECK:HLSLWaveSizeAttr 0x{{[0-9a-f]+}} <{{.*}}> 128 0 0
+ [numthreads(8,8,1)]
+ [WaveSize(
@@ -2862,6 +2862,10 @@ static bool mergeDeclAttribute(Sema &S, NamedDecl *D,
else if (const auto *NT = dyn_cast(Attr))
NewAttr = S.HLSL().mergeNumThreadsAttr(D, *NT, NT->getX(), NT->getY(),
NT->getZ());
+ else if (const auto *NT
@@ -144,6 +145,25 @@ HLSLNumThreadsAttr *SemaHLSL::mergeNumThreadsAttr(Decl *D,
HLSLNumThreadsAttr(getASTContext(), AL, X, Y, Z);
}
+HLSLWaveSizeAttr *SemaHLSL::mergeWaveSizeAttr(Decl *D,
+ const AttributeCommonInfo &AL,
+
@@ -0,0 +1,60 @@
+//===- DirectX.cpp
+//---===//
+//
+// 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
https://github.com/python3kgae approved this pull request.
https://github.com/llvm/llvm-project/pull/104856
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,9 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -ast-dump -o
- %s | FileCheck %s
+
+
+// CHECK: -HLSLTextureDimensionAttr 0x{{[0-9a-f]+}} 1
+struct [[hlsl::texture_dimension(1)]] Eg1 {
python3kgae wrote:
Should we limit this a
https://github.com/python3kgae approved this pull request.
https://github.com/llvm/llvm-project/pull/96346
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1,10 +1,13 @@
-// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -o - %s
-verify
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -ast-dump -o
- %s | FileCheck %s
-// TODO: update once we handle annotations on struct fields
+// tests that
@@ -1,11 +1,24 @@
-// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -o - %s
-verify
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -ast-dump -x hlsl -o
- %s | Filecheck %s
-// expected-no-diagnostics
struct MyBitFields {
-unsigned int field1
https://github.com/python3kgae created
https://github.com/llvm/llvm-project/pull/97001
When -fcgl is set in --driver-mode=dxc, both -S and -emit-llvm are currently
enabled.
This results in the following error:
```
error: '-S' action ignored; '-emit-llvm' action specified previously.
```
Thi
@@ -437,7 +460,206 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr
&AL) {
D->addAttr(NewAttr);
}
+struct register_binding_flags {
+ bool resource = false;
+ bool udt = false;
+ bool other = false;
+ bool basic = false;
+
+ bool srv = false;
+ bool uav =
@@ -21,6 +21,7 @@
#include "clang/Basic/IdentifierTable.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Sema/Scope.h"
+#include "clang/Sema/Sema.h"
python3kgae wrote:
What led us to include Sema.h?
https://github.com/llvm/llvm-project/pull/97103
__
@@ -437,7 +460,206 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr
&AL) {
D->addAttr(NewAttr);
}
+struct register_binding_flags {
+ bool resource = false;
+ bool udt = false;
+ bool other = false;
+ bool basic = false;
+
+ bool srv = false;
+ bool uav =
@@ -21,6 +21,7 @@
#include "clang/Basic/IdentifierTable.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Sema/Scope.h"
+#include "clang/Sema/Sema.h"
python3kgae wrote:
If only SemaHLSL.cpp needs the header, could we move the include to
SemaHLSL.cpp?
python3kgae wrote:
> > > This pull request is missing the appropriate text in 'ReleaseNotes.rst'.
> > > I am looking for advice on what is appropriate to put in that file, and
> > > where.
> >
> >
> > Here's a PR with ReleaseNotes.rst change
> > [57f879c#diff-ec770381d76c859f5f572db789175fe4
https://github.com/python3kgae approved this pull request.
https://github.com/llvm/llvm-project/pull/107923
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/python3kgae updated
https://github.com/llvm/llvm-project/pull/107176
>From 3b4ba1436220d6eef11bce713618aefb272ea74f Mon Sep 17 00:00:00 2001
From: Xiang Li
Date: Tue, 3 Sep 2024 22:56:21 -0400
Subject: [PATCH 1/2] [HLSL] generate hlsl.wavesize attribute
Generate function att
https://github.com/python3kgae approved this pull request.
https://github.com/llvm/llvm-project/pull/108292
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -12397,6 +12397,9 @@ def warn_attr_min_eq_max: Warning<
def err_hlsl_attribute_number_arguments_insufficient_shader_model: Error<
"attribute %0 with %1 arguments requires shader model %2 or greater">;
+def ext_hlsl_auto_type_specifier : ExtWarn<
python3k
https://github.com/python3kgae approved this pull request.
https://github.com/llvm/llvm-project/pull/108437
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,56 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o -
-fsyntax-only %s -verify
+
+// valid
+cbuffer cbuf {
+RWBuffer r : register(u0, space0);
+}
+
+cbuffer cbuf2 {
+struct x {
+// expected-error@+1 {{'register' attribute only ap
@@ -0,0 +1,56 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o -
-fsyntax-only %s -verify
+
+// valid
+cbuffer cbuf {
+RWBuffer r : register(u0, space0);
+}
+
+cbuffer cbuf2 {
+struct x {
+// expected-error@+1 {{'register' attribute only ap
https://github.com/python3kgae approved this pull request.
Why the name is contained_type instead of element_type?
https://github.com/llvm/llvm-project/pull/108456
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/m
https://github.com/python3kgae approved this pull request.
https://github.com/llvm/llvm-project/pull/108686
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/python3kgae approved this pull request.
https://github.com/llvm/llvm-project/pull/110306
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -19,20 +19,20 @@
using namespace llvm;
static bool finalizeLinkage(Module &M) {
- SmallPtrSet EntriesAndExports;
+ SmallPtrSet Funcs;
// Find all entry points and export functions
for (Function &EF : M.functions()) {
-if (!EF.hasFnAttribute("hlsl.shader") && !
https://github.com/python3kgae approved this pull request.
https://github.com/llvm/llvm-project/pull/106146
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/python3kgae approved this pull request.
https://github.com/llvm/llvm-project/pull/108924
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1,16 +1,25 @@
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -ast-dump -o
- %s | FileCheck %s
// CHECK: CXXRecordDecl 0x{{[0-9a-f]+}} {{.*}} struct MyBuffer definition
-// CHECK: FieldDecl 0x{{[0-9a-f]+}} col:68 h
'__hlsl_resource_t {{\[\[}}hlsl::reso
https://github.com/python3kgae approved this pull request.
https://github.com/llvm/llvm-project/pull/108919
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/python3kgae approved this pull request.
https://github.com/llvm/llvm-project/pull/109023
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/python3kgae approved this pull request.
https://github.com/llvm/llvm-project/pull/106782
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/python3kgae updated
https://github.com/llvm/llvm-project/pull/107176
>From 6de0eb900e845e6ac7918433c597bf3665b93741 Mon Sep 17 00:00:00 2001
From: Xiang Li
Date: Tue, 3 Sep 2024 22:56:21 -0400
Subject: [PATCH 1/2] [HLSL] generate hlsl.wavesize attribute
Generate function att
https://github.com/python3kgae closed
https://github.com/llvm/llvm-project/pull/107176
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
301 - 336 of 336 matches
Mail list logo