https://github.com/inbelic updated
https://github.com/llvm/llvm-project/pull/147115
>From bef7466d6110c682ee5887b7fc98c980f7a1ec94 Mon Sep 17 00:00:00 2001
From: Finn Plummer
Date: Fri, 27 Jun 2025 18:36:38 +
Subject: [PATCH 01/15] nfc: introduce wrapper `RootSignatureElement` around
`Root
inbelic wrote:
This should be in the include directory
https://github.com/llvm/llvm-project/pull/146785
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/li
@@ -0,0 +1,160 @@
+; RUN: not opt -S -passes='dxil-post-optimization-validation'
-mtriple=dxil-pc-shadermodel6.6-compute %s 2>&1
+
+; CHECK: error: register cbuffer (space=665, register=3) is not defined in
Root Signature
+; CHECK: error: register srv (space=0, register=0) is n
@@ -14,10 +14,129 @@
#ifndef LLVM_LIB_TARGET_DIRECTX_DXILPOSTOPTIMIZATIONVALIDATION_H
#define LLVM_LIB_TARGET_DIRECTX_DXILPOSTOPTIMIZATIONVALIDATION_H
+#include "DXILRootSignature.h"
+#include "llvm/ADT/IntervalMap.h"
+#include "llvm/Analysis/DXILResource.h"
#include "llvm/IR
https://github.com/inbelic updated
https://github.com/llvm/llvm-project/pull/147800
>From 95166f5e2bfb2816ce39d3abd1823486742109bd Mon Sep 17 00:00:00 2001
From: Finn Plummer
Date: Wed, 9 Jul 2025 15:50:55 +
Subject: [PATCH 01/11] remove confusing hlsl_unexpected_end_of_params
diagnostic
https://github.com/inbelic updated
https://github.com/llvm/llvm-project/pull/147832
>From 7ec7e32d2ac4945a489d5463b9fb700b0cceff9d Mon Sep 17 00:00:00 2001
From: Finn Plummer
Date: Wed, 9 Jul 2025 21:21:53 +
Subject: [PATCH] [HLSL][RootSignature] Implement multiple diagnostics in
`RootSign
https://github.com/inbelic edited
https://github.com/llvm/llvm-project/pull/147832
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/inbelic edited
https://github.com/llvm/llvm-project/pull/147832
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
inbelic wrote:
Ah okay, didn't realize it follows a different structure here. Thanks for
checking
https://github.com/llvm/llvm-project/pull/146785
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.o
@@ -94,14 +147,83 @@ static void reportErrors(Module &M, DXILResourceMap &DRM,
assert(!DRBI.hasImplicitBinding() && "implicit bindings should be handled in
"
"DXILResourceImplicitBinding pass");
+
+ if (auto RSD = getRootSignature(RSB
@@ -14,10 +14,129 @@
#ifndef LLVM_LIB_TARGET_DIRECTX_DXILPOSTOPTIMIZATIONVALIDATION_H
#define LLVM_LIB_TARGET_DIRECTX_DXILPOSTOPTIMIZATIONVALIDATION_H
+#include "DXILRootSignature.h"
+#include "llvm/ADT/IntervalMap.h"
+#include "llvm/Analysis/DXILResource.h"
#include "llvm/IR
@@ -14,10 +14,129 @@
#ifndef LLVM_LIB_TARGET_DIRECTX_DXILPOSTOPTIMIZATIONVALIDATION_H
#define LLVM_LIB_TARGET_DIRECTX_DXILPOSTOPTIMIZATIONVALIDATION_H
+#include "DXILRootSignature.h"
+#include "llvm/ADT/IntervalMap.h"
+#include "llvm/Analysis/DXILResource.h"
#include "llvm/IR
@@ -0,0 +1,160 @@
+; RUN: not opt -S -passes='dxil-post-optimization-validation'
-mtriple=dxil-pc-shadermodel6.6-compute %s 2>&1
+
+; CHECK: error: register cbuffer (space=665, register=3) is not defined in
Root Signature
+; CHECK: error: register srv (space=0, register=0) is n
@@ -14,10 +14,129 @@
#ifndef LLVM_LIB_TARGET_DIRECTX_DXILPOSTOPTIMIZATIONVALIDATION_H
#define LLVM_LIB_TARGET_DIRECTX_DXILPOSTOPTIMIZATIONVALIDATION_H
+#include "DXILRootSignature.h"
+#include "llvm/ADT/IntervalMap.h"
+#include "llvm/Analysis/DXILResource.h"
#include "llvm/IR
@@ -0,0 +1,160 @@
+; RUN: not opt -S -passes='dxil-post-optimization-validation'
-mtriple=dxil-pc-shadermodel6.6-compute %s 2>&1
+
+; CHECK: error: register cbuffer (space=665, register=3) is not defined in
Root Signature
+; CHECK: error: register srv (space=0, register=0) is n
https://github.com/inbelic updated
https://github.com/llvm/llvm-project/pull/147832
>From 7ec7e32d2ac4945a489d5463b9fb700b0cceff9d Mon Sep 17 00:00:00 2001
From: Finn Plummer
Date: Wed, 9 Jul 2025 21:21:53 +
Subject: [PATCH 1/3] [HLSL][RootSignature] Implement multiple diagnostics in
`Root
@@ -27,51 +36,68 @@ RootSignatureParser::RootSignatureParser(
bool RootSignatureParser::parse() {
// Iterate as many RootSignatureElements as possible, until we hit the
// end of the stream
+ bool HadError = false;
while (!peekExpectedToken(TokenKind::end_of_stream)) {
@@ -27,51 +36,68 @@ RootSignatureParser::RootSignatureParser(
bool RootSignatureParser::parse() {
// Iterate as many RootSignatureElements as possible, until we hit the
// end of the stream
+ bool HadError = false;
while (!peekExpectedToken(TokenKind::end_of_stream)) {
@@ -27,51 +36,68 @@ RootSignatureParser::RootSignatureParser(
bool RootSignatureParser::parse() {
// Iterate as many RootSignatureElements as possible, until we hit the
// end of the stream
+ bool HadError = false;
while (!peekExpectedToken(TokenKind::end_of_stream)) {
@@ -27,51 +36,68 @@ RootSignatureParser::RootSignatureParser(
bool RootSignatureParser::parse() {
// Iterate as many RootSignatureElements as possible, until we hit the
// end of the stream
+ bool HadError = false;
inbelic wrote:
The pattern that I have s
https://github.com/inbelic edited
https://github.com/llvm/llvm-project/pull/147832
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/inbelic edited
https://github.com/llvm/llvm-project/pull/147832
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -111,14 +110,25 @@ analyzeModule(Module &M) {
reportError(Ctx, "Root Element is not a metadata node.");
continue;
}
-mcdxbc::RootSignatureDesc RSD;
-if (std::optional Version = extractMdIntValue(RSDefNode, 2))
- RSD.Version = *Version;
+uint3
inbelic wrote:
The changes to all the test files here seem strange
https://github.com/llvm/llvm-project/pull/149232
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bi
inbelic wrote:
Does `joinErrors` allow for automatic reporting of multiple errors? If so can
we add a test to demonstrate?
https://github.com/llvm/llvm-project/pull/149232
___
llvm-branch-commits mailing list
llvm-br
@@ -111,14 +110,25 @@ analyzeModule(Module &M) {
reportError(Ctx, "Root Element is not a metadata node.");
continue;
}
-mcdxbc::RootSignatureDesc RSD;
-if (std::optional Version = extractMdIntValue(RSDefNode, 2))
- RSD.Version = *Version;
+uint3
@@ -249,6 +260,20 @@ getRootSignature(RootSignatureBindingInfo &RSBI,
return RootSigDesc;
}
+static void reportInvalidHandleTy(
+Module &M,
+const iterator_range::iterator>
+&Resources) {
+ for (auto Res = Resources.begin(), End = Resources.end(); Res != End
@@ -249,6 +260,20 @@ getRootSignature(RootSignatureBindingInfo &RSBI,
return RootSigDesc;
}
+static void reportInvalidHandleTy(
+Module &M,
+const iterator_range::iterator>
inbelic wrote:
nit:
```suggestion
dxil::ResourceInfo::iterator_range
```
@@ -21,7 +21,7 @@ entry:
%CB = tail call target("dx.CBuffer", target("dx.Layout", %__cblayout_CB, 4,
0)) @llvm.dx.resource.handlefrombinding(i32 1, i32 3, i32 1, i32 0, i1 false,
ptr nonnull @CB.str)
%Sampler = call target("dx.Sampler", 0)
@llvm.dx.resource.handlefrombind
@@ -312,21 +399,22 @@ static void reportErrors(Module &M, DXILResourceMap &DRM,
"DXILResourceImplicitBinding pass");
if (auto RSD = getRootSignature(RSBI, MMI)) {
-
-llvm::hlsl::rootsig::RootSignatureBindingValidation Validation =
-
@@ -260,6 +260,93 @@ getRootSignature(RootSignatureBindingInfo &RSBI,
return RootSigDesc;
}
+static void
+reportOverlappingRegisters(Module &M,
+ llvm::hlsl::rootsig::OverlappingRanges Overlap) {
+ const llvm::hlsl::rootsig::RangeInfo *Info = Overl
inbelic wrote:
Can we add a test for when there are multiple overlaps. Just to make sure
multiple diagnostics are being generated.
https://github.com/llvm/llvm-project/pull/148919
___
llvm-branch-commits mailing list
201 - 232 of 232 matches
Mail list logo