[llvm] 1abc931 - [DirectX] Remove redundant resource kind handling. NFC (#70691)

via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 30 13:35:30 PDT 2023


Author: Justin Bogner
Date: 2023-10-30T13:35:25-07:00
New Revision: 1abc931d469bca47193efa4d0676776c31438f3e

URL: https://github.com/llvm/llvm-project/commit/1abc931d469bca47193efa4d0676776c31438f3e
DIFF: https://github.com/llvm/llvm-project/commit/1abc931d469bca47193efa4d0676776c31438f3e.diff

LOG: [DirectX] Remove redundant resource kind handling. NFC (#70691)

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

Added: 
    

Modified: 
    llvm/lib/Target/DirectX/DXILResource.cpp

Removed: 
    


################################################################################
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