[llvm] [DirectX] introducing lowering for `bufferUpdateCounter` (PR #115041)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 5 10:22:51 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 fa57c7a6a5f594a9e3ae2dbe3542cf89a20cdd73 79af81421af40f558ef75cb94b46821cb4b0f54d --extensions cpp -- llvm/lib/Target/DirectX/DXILOpLowering.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Target/DirectX/DXILOpLowering.cpp b/llvm/lib/Target/DirectX/DXILOpLowering.cpp
index df23c3320d..0dd3a8dc1a 100644
--- a/llvm/lib/Target/DirectX/DXILOpLowering.cpp
+++ b/llvm/lib/Target/DirectX/DXILOpLowering.cpp
@@ -463,9 +463,9 @@ public:
});
}
- [[nodiscard]] bool lowerUpdateCounter(Function &F) {
- IRBuilder<> &IRB = OpBuilder.getIRB();
-
+ [[nodiscard]] bool lowerUpdateCounter(Function &F) {
+ IRBuilder<> &IRB = OpBuilder.getIRB();
+
return replaceFunction(F, [&](CallInst *CI) -> Error {
IRB.SetInsertPoint(CI);
Value *Handle =
@@ -474,7 +474,8 @@ public:
std::array<Value *, 2> Args{Handle, Op1};
- Expected<CallInst *> OpCall = OpBuilder.tryCreateOp(OpCode::UpdateCounter, Args, CI->getName());
+ Expected<CallInst *> OpCall =
+ OpBuilder.tryCreateOp(OpCode::UpdateCounter, Args, CI->getName());
if (Error E = OpCall.takeError())
return E;
@@ -482,7 +483,7 @@ public:
CI->eraseFromParent();
return Error::success();
});
- }
+ }
[[nodiscard]] bool lowerTypedBufferStore(Function &F) {
IRBuilder<> &IRB = OpBuilder.getIRB();
@@ -623,7 +624,7 @@ public:
break;
case Intrinsic::dx_updateCounter:
HasErrors |= lowerUpdateCounter(F);
- break;
+ break;
// TODO: this can be removed when
// https://github.com/llvm/llvm-project/issues/113192 is fixed
case Intrinsic::dx_splitdouble:
``````````
</details>
https://github.com/llvm/llvm-project/pull/115041
More information about the llvm-commits
mailing list