[Mlir-commits] [mlir] [MLIR] Introduce support for early exits (PR #166688)

Matthias Springer llvmlistbot at llvm.org
Wed Jun 3 00:42:36 PDT 2026


================
@@ -504,33 +504,45 @@ In MLIR, control flow semantics of a region is indicated by
 regions support semantics where operations in a region 'execute sequentially'.
 Before an operation executes, its operands have well-defined values. After an
 operation executes, the operands have the same values and results also have
-well-defined values. After an operation executes, the next operation in the
-block executes until the operation is the terminator operation at the end of a
-block, in which case some other operation will execute. The determination of the
-next instruction to execute is the 'passing of control flow'.
+well-defined values.
+
+Usually, after an operation executes, the next operation in the block executes
+until the operation is the terminator operation at the end of a block, in which
+case the control will be transferred to another block or one of the parent
+operations. The determination of the next instruction to execute is the 'passing
+of control flow'. The control-flow can be interrupted by an operation if it
----------------
matthias-springer wrote:

`can be interrupted by an operation in the middle of a block`

Not sure if this is entirely accurate because a terminator may also interrupt the block? The main point is to put emphasis on the fact that not only the block terminator can exit a block...

~~We may even want to explicitly mention the term "single-entry, multiple-exit block" here.~~ edit: we already do below.

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


More information about the Mlir-commits mailing list