[Mlir-commits] [mlir] [MLIR][SliceAnalysis] Add comment and restore failure condition (PR #142223)

Jacques Pienaar llvmlistbot at llvm.org
Mon Jun 9 01:59:24 PDT 2025


================
@@ -109,6 +109,8 @@ static LogicalResult getBackwardSliceImpl(Operation *op,
         if (parentOp->getNumRegions() == 1 &&
             llvm::hasSingleElement(parentOp->getRegion(0).getBlocks())) {
           return getBackwardSliceImpl(parentOp, backwardSlice, options);
+        } else {
+          return failure();
----------------
jpienaar wrote:

+1, I was missing one too in the original. Thanks for updating the comment.

So this just fails due to missing support in getBackwardSlice? E.g., its difficult to determine that to slice and semantics of ops in this case and so just bail. An alternative would have been to have the filter function capture this (fail to propagate post out into such ops and record the need/failure, and handle post - less efficient than this early exit but there are just a lot of ignoring of this return now).

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


More information about the Mlir-commits mailing list