[Mlir-commits] [mlir] [mlir][SCF] Add `RecursiveMemoryEffects` to `scf.reduce` (PR #75314)
Matthias Springer
llvmlistbot at llvm.org
Wed Dec 13 02:51:33 PST 2023
https://github.com/matthias-springer created https://github.com/llvm/llvm-project/pull/75314
`scf.reduce` itself does not have any side effects, but its body may.
>From b27dbc63ce629a90e80f46ed8bb29b0be3ad48cc Mon Sep 17 00:00:00 2001
From: Matthias Springer <springerm at google.com>
Date: Wed, 13 Dec 2023 19:49:36 +0900
Subject: [PATCH] [mlir][SCF] Add `RecursiveMemoryEffects` to `scf.reduce`
`scf.reduce` itself does not have any side effects, but its body may.
---
mlir/include/mlir/Dialect/SCF/IR/SCFOps.td | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/mlir/include/mlir/Dialect/SCF/IR/SCFOps.td b/mlir/include/mlir/Dialect/SCF/IR/SCFOps.td
index 573e804b405e8..3948f145d50bd 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.
More information about the Mlir-commits
mailing list