[llvm] [DirectX] Remove redundant resource kind handling. NFC (PR #70691)

Justin Bogner via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 30 09:59:28 PDT 2023


https://github.com/bogner created https://github.com/llvm/llvm-project/pull/70691

The frontend passes this along since https://reviews.llvm.org/D135335

>From 115bf0a7acf310824d8d990e06a5b3b63650b0ad Mon Sep 17 00:00:00 2001
From: Justin Bogner <mail at justinbogner.com>
Date: Thu, 26 Oct 2023 09:41:17 -0700
Subject: [PATCH] [DirectX] Remove redundant resource kind handling. NFC

The frontend passes this along since https://reviews.llvm.org/D135335
---
 llvm/lib/Target/DirectX/DXILResource.cpp | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/llvm/lib/Target/DirectX/DXILResource.cpp b/llvm/lib/Target/DirectX/DXILResource.cpp
index dde7255e04254e2..0390a3f0a558d83 100644
--- a/llvm/lib/Target/DirectX/DXILResource.cpp
+++ b/llvm/lib/Target/DirectX/DXILResource.cpp
@@ -260,20 +260,6 @@ void UAVResource::print(raw_ostream &OS) const {
 // https://github.com/llvm/llvm-project/issues/57991).
 void UAVResource::parseSourceType(StringRef S) {
   IsROV = S.startswith("RasterizerOrdered");
-  if (IsROV)
-    S = S.substr(strlen("RasterizerOrdered"));
-  if (S.startswith("RW"))
-    S = S.substr(strlen("RW"));
-
-  // Note: I'm deliberately not handling any of the Texture buffer types at the
-  // moment. I want to resolve the issue above before adding Texture or Sampler
-  // support.
-  Shape = StringSwitch<ResourceBase::Kinds>(S)
-              .StartsWith("Buffer<", Kinds::TypedBuffer)
-              .StartsWith("ByteAddressBuffer<", Kinds::RawBuffer)
-              .StartsWith("StructuredBuffer<", Kinds::StructuredBuffer)
-              .Default(Kinds::Invalid);
-  assert(Shape != Kinds::Invalid && "Unsupported buffer type");
 
   S = S.substr(S.find("<") + 1);
 



More information about the llvm-commits mailing list