[llvm] Dx lower to rawbufferload dxil ops draft PR (PR #116845)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 19 09:37:10 PST 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff cd418030de7ae75750bc4e48d1238baf03c675e5 3a8f3a1996ed2c87aae08632fcb4fc08893cfae1 --extensions h,cpp -- llvm/include/llvm/Analysis/DXILResource.h llvm/lib/Analysis/DXILResource.cpp llvm/lib/Target/DirectX/DXILOpLowering.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Analysis/DXILResource.cpp b/llvm/lib/Analysis/DXILResource.cpp
index be4fad8a84..ed9644bff0 100644
--- a/llvm/lib/Analysis/DXILResource.cpp
+++ b/llvm/lib/Analysis/DXILResource.cpp
@@ -791,19 +791,18 @@ void DXILResourceMap::updateResourceMap(CallInst *origCallInst,
}
}
- void DXILResourceMap::updateResUseMap(CallInst *origResUse,
+void DXILResourceMap::updateResUseMap(CallInst *origResUse,
std::vector<Value *> &multiNewResUse) {
- assert((origResUse != nullptr) && "Wrong Inputs");
+ assert((origResUse != nullptr) && "Wrong Inputs");
- for (int i = 0; i < multiNewResUse.size(); ++i) {
- CallInst *newResUse = dyn_cast<CallInst>(multiNewResUse[i]);
- assert(newResUse != nullptr);
+ for (int i = 0; i < multiNewResUse.size(); ++i) {
+ CallInst *newResUse = dyn_cast<CallInst>(multiNewResUse[i]);
+ assert(newResUse != nullptr);
- bool keepOrigResUseInMap =
- i == (multiNewResUse.size() - 1) ? false : true;
- updateResUseMapCommon(origResUse, newResUse, keepOrigResUseInMap);
- }
+ bool keepOrigResUseInMap = i == (multiNewResUse.size() - 1) ? false : true;
+ updateResUseMapCommon(origResUse, newResUse, keepOrigResUseInMap);
}
+}
void DXILResourceMap::print(raw_ostream &OS) const {
for (unsigned I = 0, E = Resources.size(); I != E; ++I) {
diff --git a/llvm/lib/Target/DirectX/DXILOpLowering.cpp b/llvm/lib/Target/DirectX/DXILOpLowering.cpp
index d2b6f05fc9..a8c8b8c870 100644
--- a/llvm/lib/Target/DirectX/DXILOpLowering.cpp
+++ b/llvm/lib/Target/DirectX/DXILOpLowering.cpp
@@ -778,7 +778,7 @@ public:
assert(It != DRM.end() && "Resource not in map?");
dxil::ResourceInfo &RI = *It;
- ResourceKind RCKind = RI.getResourceKind();
+ ResourceKind RCKind = RI.getResourceKind();
assert((RCKind == dxil::ResourceKind::StructuredBuffer) ||
(RCKind == dxil::ResourceKind::RawBuffer));
``````````
</details>
https://github.com/llvm/llvm-project/pull/116845
More information about the llvm-commits
mailing list