This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Fix body-less async.execute printing
ClosedPublic

Authored by csigg on Jun 4 2021, 4:52 AM.

Diff Detail

Event Timeline

csigg created this revision.Jun 4 2021, 4:52 AM
csigg requested review of this revision.Jun 4 2021, 4:52 AM
ezhulenev accepted this revision.Jun 8 2021, 3:11 AM
This revision is now accepted and ready to land.Jun 8 2021, 3:11 AM

Execute without a body doesn't make much sense, maybe check it in verifier? Currently it will also fail because of op.body() access

csigg added a comment.EditedJun 8 2021, 3:35 AM

An op should be printable even if it's not valid. In particular, running conversions where async.execute bodies are moved to clones should not crash with '-debug'. The op.body() access is fine, the region always exists but may be empty.

This revision was automatically updated to reflect the committed changes.