[Mlir-commits] [mlir] [mlir][ControlFlow] Improve time complexity of RegionBranchOpInterface canonicalization patterns (PR #186114)

Matthias Springer llvmlistbot at llvm.org
Thu Mar 12 08:57:07 PDT 2026


================
@@ -630,6 +631,15 @@ static bool isDefinedBefore(Operation *regionBranchOp, Value a, Value b) {
 /// Compute all non-successor-input values that a successor input could have
 /// based on the given successor input to successor operand mapping.
 ///
+/// Starting with the given value, trace back all predecessor values (i.e.,
+/// preceding successor operands) and add them to the set of reachable values.
+/// If the successor operand is again a successor input, do not add it to the
+/// result set, but instead continue the traversal.
+///
+/// If `maxReachableValues` is non-zero, the traversal is aborted early as soon
----------------
matthias-springer wrote:

Let's use std::optional.

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


More information about the Mlir-commits mailing list