[Mlir-commits] [mlir] [mlir][acc] Erase empty kernel_environment ops during canonicalization (PR #166633)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Wed Nov 5 12:59:15 PST 2025


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 origin/main HEAD --extensions cpp -- mlir/lib/Dialect/OpenACC/IR/OpenACC.cpp --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/mlir/lib/Dialect/OpenACC/IR/OpenACC.cpp b/mlir/lib/Dialect/OpenACC/IR/OpenACC.cpp
index eef36b85a..a7c1b74e7 100644
--- a/mlir/lib/Dialect/OpenACC/IR/OpenACC.cpp
+++ b/mlir/lib/Dialect/OpenACC/IR/OpenACC.cpp
@@ -1059,13 +1059,11 @@ struct RemoveEmptyKernelEnvironment
     // Remove empty kernel environment
     // preserve synchronization by creating acc.wait operation if needed
     if (!op.getWaitOperands().empty())
-      rewriter.replaceOpWithNewOp<acc::WaitOp>(
-          op,
-          op.getWaitOperands(),
-          /*asyncOperand=*/Value(),
-          /*waitDevnum=*/Value(),
-          /*async=*/nullptr,
-          /*ifCond=*/Value());
+      rewriter.replaceOpWithNewOp<acc::WaitOp>(op, op.getWaitOperands(),
+                                               /*asyncOperand=*/Value(),
+                                               /*waitDevnum=*/Value(),
+                                               /*async=*/nullptr,
+                                               /*ifCond=*/Value());
     else
       rewriter.eraseOp(op);
 

``````````

</details>


https://github.com/llvm/llvm-project/pull/166633


More information about the Mlir-commits mailing list