[Mlir-commits] [mlir] [mlir][Interfaces] Add `ExecutionProgressOpInterface` + folding pattern (PR #180348)

Mehdi Amini llvmlistbot at llvm.org
Wed Feb 18 03:14:07 PST 2026


================
@@ -0,0 +1,48 @@
+//===- ExecutionProgressOpInterface.td - Interface Decl. -*- tablegen -*---===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// This is the definition file for the ExecutionProgressOpInterface.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef MLIR_INTERFACES_EXECUTION_PROGRESS_OP_INTERFACE
+#define MLIR_INTERFACES_EXECUTION_PROGRESS_OP_INTERFACE
+
+include "mlir/IR/OpBase.td"
+
+def ExecutionProgressOpInterface : OpInterface<"ExecutionProgressOpInterface"> {
+  let description = [{
+    This interface models execution progress properties of operations.
+  }];
+  let cppNamespace = "::mlir";
+  let methods = [
+    InterfaceMethod<
+      /*desc=*/[{
+        Operations that "must progress" are required to return normally (control
+        flow reaches the next operation) or interact with the environment in an
+        observable way (e.g., volatile memory access, I/O, synchronization or
+        program termination). If a "must progress" op executes indefinitely
+        without any observable interaction, it may be erased.
----------------
joker-eph wrote:

Right now this means that `mustProgress(op)`  does not say much about an operation with side effets.

Another problem is that we still are missing "volatile" effects in MLIR (unless I missed the addition).

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


More information about the Mlir-commits mailing list