[Mlir-commits] [mlir] [mlir][SCF] Add `RecursiveMemoryEffects` to `scf.reduce` (PR #75314)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Wed Dec 13 02:52:04 PST 2023


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-mlir

Author: Matthias Springer (matthias-springer)

<details>
<summary>Changes</summary>

`scf.reduce` itself does not have any side effects, but its body may.

---
Full diff: https://github.com/llvm/llvm-project/pull/75314.diff


1 Files Affected:

- (modified) mlir/include/mlir/Dialect/SCF/IR/SCFOps.td (+2-1) 


``````````diff
diff --git a/mlir/include/mlir/Dialect/SCF/IR/SCFOps.td b/mlir/include/mlir/Dialect/SCF/IR/SCFOps.td
index 573e804b405e84..3948f145d50bd6 100644
--- a/mlir/include/mlir/Dialect/SCF/IR/SCFOps.td
+++ b/mlir/include/mlir/Dialect/SCF/IR/SCFOps.td
@@ -853,7 +853,8 @@ def ParallelOp : SCF_Op<"parallel",
 // ReduceOp
 //===----------------------------------------------------------------------===//
 
-def ReduceOp : SCF_Op<"reduce", [HasParent<"ParallelOp">]> {
+def ReduceOp : SCF_Op<"reduce", [
+    HasParent<"ParallelOp">, RecursiveMemoryEffects]> {
   let summary = "reduce operation for parallel for";
   let description = [{
     "scf.reduce" is an operation occurring inside "scf.parallel" operations.

``````````

</details>


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


More information about the Mlir-commits mailing list