[llvm-branch-commits] [llvm] [mlir] [MLIR] Filter ReturnLike for RecursiveMemoryEffect (PR #244746)
Alex Zinenko via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Nov 23 00:51:42 PST 2026
================
@@ -36,6 +37,12 @@ bool mlir::isOpTriviallyDead(Operation *op) {
return op->use_empty() && wouldOpBeTriviallyDead(op);
}
+static bool exitsParentRegionBranchOp(Operation *op) {
----------------
ftynse wrote:
This doesn't guarantee that the op exits. It _may_ and only if the early-exit PR lands. Currently, LangRef only allows:
> Successors explicitly specify destination blocks, so control flow within the region can only pass to one of the specified successor blocks, as in a branch operation. When a terminator has no successors, it may pass 1) control back to the containing operation, as in a return operation, or 2) define that control flow does not continue, as in ub.unreachable.
so nothing should be exiting the region (beyond returning to the enclosing operation, which `RegionBranchTerminatorOpInterface` may also signal)
https://github.com/llvm/llvm-project/pull/244746
More information about the llvm-branch-commits
mailing list