[PATCH] D75369: 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 10:23:49 PST 2020
matthiaskramm created this revision.
matthiaskramm added a reviewer: mehdi_amini.
Herald added subscribers: llvm-commits, Joonsoo, liufengdb, lucyrfox, mgester, arpith-jacob, nicolasvasilache, antiagainst, shauheen, burmako, jpienaar, rriddle.
Herald added a project: LLVM.
Make computeConversionSet bubble up errors from nested regions. Note
that this doesn't change top-level behavior - since the nested region
calls emitError, the error was visible before, just not surfaced as
quickly.
Repository:
rG LLVM Github Monorepo
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,12 @@
: 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()) {
+ auto result = computeConversionSet(region.getBlocks(), region.getLoc(),
+ toConvert, target);
+ if (failed(result))
+ return result;
+ }
}
// Recurse to children that haven't been visited.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75369.247309.patch
Type: text/x-patch
Size: 870 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200228/9099b162/attachment.bin>
More information about the llvm-commits
mailing list