This is an archive of the discontinued LLVM Phabricator instance.

[mlir][DialectConversion] Abort early if a subregion has a disconnected CFG.
ClosedPublic

Authored by matthiaskramm on Feb 28 2020, 10:23 AM.

Details

Summary

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.

Diff Detail

Event Timeline

matthiaskramm created this revision.Feb 28 2020, 10:23 AM
rriddle added a comment.EditedFeb 28 2020, 10:43 AM

Can you please make sure to add a [mlir] tag to the beginning of the commit title?

mlir/lib/Transforms/DialectConversion.cpp
55

nit: Just inline this variable.

rriddle accepted this revision.Feb 28 2020, 10:52 AM
rriddle retitled this revision from Abort early if a subregion has a disconnected CFG. to [mlir][DialectConversion] Abort early if a subregion has a disconnected CFG..
This revision is now accepted and ready to land.Feb 28 2020, 10:53 AM
matthiaskramm marked an inline comment as done.Feb 28 2020, 11:17 AM
matthiaskramm added inline comments.
mlir/lib/Transforms/DialectConversion.cpp
55

Good idea, but I can't- it's also used in the return.

matthiaskramm marked an inline comment as done.Feb 28 2020, 11:22 AM
matthiaskramm added inline comments.
mlir/lib/Transforms/DialectConversion.cpp
55

Nm, I see what you mean now. Changing.

Wrapped the failed() directly around the recursive call.

Do you need me to land this for you?

Yes please. Thank you!

This revision was automatically updated to reflect the committed changes.