[PATCH] D75369: [mlir][DialectConversion] Abort early if a subregion has a disconnected CFG.
Matthias Kramm via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 28 11:30:56 PST 2020
matthiaskramm updated this revision to Diff 247324.
matthiaskramm added a comment.
Wrapped the failed() directly around the recursive call.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75369/new/
https://reviews.llvm.org/D75369
Files:
mlir/lib/Transforms/DialectConversion.cpp
Index: mlir/lib/Transforms/DialectConversion.cpp
===================================================================
--- mlir/lib/Transforms/DialectConversion.cpp
+++ mlir/lib/Transforms/DialectConversion.cpp
@@ -51,9 +51,11 @@
: Optional<ConversionTarget::LegalOpDetails>();
if (legalityInfo && legalityInfo->isRecursivelyLegal)
continue;
- for (auto ®ion : op.getRegions())
- computeConversionSet(region.getBlocks(), region.getLoc(), toConvert,
- target);
+ for (auto ®ion : op.getRegions()) {
+ if (failed(computeConversionSet(region.getBlocks(), region.getLoc(),
+ toConvert, target)))
+ return failure();
+ }
}
// Recurse to children that haven't been visited.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75369.247324.patch
Type: text/x-patch
Size: 839 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200228/9111384f/attachment.bin>
More information about the llvm-commits
mailing list