[llvm] [DirectX] Remove redundant resource kind handling. NFC (PR #70691)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 30 10:01:40 PDT 2023
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-directx
Author: Justin Bogner (bogner)
<details>
<summary>Changes</summary>
The frontend passes this along since https://reviews.llvm.org/D135335
---
Full diff: https://github.com/llvm/llvm-project/pull/70691.diff
1 Files Affected:
- (modified) llvm/lib/Target/DirectX/DXILResource.cpp (-14)
``````````diff
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);
``````````
</details>
https://github.com/llvm/llvm-project/pull/70691
More information about the llvm-commits
mailing list