[llvm-branch-commits] [clang] [llvm] [DirectX] Add Range Overlap validation to `DXILPostOptimizationValidation.cpp` (PR #148919)

Joshua Batista via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Jul 17 11:29:36 PDT 2025


================
@@ -312,21 +399,22 @@ static void reportErrors(Module &M, DXILResourceMap &DRM,
                                        "DXILResourceImplicitBinding pass");
 
   if (auto RSD = getRootSignature(RSBI, MMI)) {
-
-    llvm::hlsl::rootsig::RootSignatureBindingValidation Validation =
-        initRSBindingValidation(*RSD, tripleToVisibility(MMI.ShaderProfile));
-
-    reportUnboundRegisters(M, Validation, ResourceClass::CBuffer,
-                           DRM.cbuffers());
-    reportUnboundRegisters(M, Validation, ResourceClass::UAV, DRM.uavs());
-    reportUnboundRegisters(M, Validation, ResourceClass::Sampler,
-                           DRM.samplers());
-    reportUnboundRegisters(M, Validation, ResourceClass::SRV, DRM.srvs());
-
-    reportInvalidHandleTy(M, DRM.cbuffers());
-    reportInvalidHandleTy(M, DRM.srvs());
-    reportInvalidHandleTy(M, DRM.uavs());
-    reportInvalidHandleTy(M, DRM.samplers());
+    if (!reportOverlappingRanges(M, *RSD)) {
----------------
bob80905 wrote:

Why do the subsequent checks depend on this condition? Is it possible to report this and then unconditionally report the rest of the possible errors?

https://github.com/llvm/llvm-project/pull/148919


More information about the llvm-branch-commits mailing list