[Mlir-commits] [mlir] [MLIR] Change getBackwardSlice to return a logicalresult rather than … (PR #140961)
Oleksandr Alex Zinenko
llvmlistbot at llvm.org
Wed May 21 14:38:03 PDT 2025
================
@@ -290,8 +290,10 @@ static void getPipelineStages(
});
options.inclusive = true;
for (Operation &op : forOp.getBody()->getOperations()) {
- if (stage0Ops.contains(&op))
- getBackwardSlice(&op, &dependencies, options);
+ if (stage0Ops.contains(&op)) {
+ auto result = getBackwardSlice(&op, &dependencies, options);
+ assert(result.succeeded());
----------------
ftynse wrote:
```suggestion
LogicalResult result = getBackwardSlice(&op, &dependencies, options);
assert(result.succeeded() && "expected a backward slice");
```
https://github.com/llvm/llvm-project/pull/140961
More information about the Mlir-commits
mailing list