This is an archive of the discontinued LLVM Phabricator instance.

[mlir][OpFormatGen] Add initial support for regions in the custom op assembly format
ClosedPublic

Authored by rriddle on Aug 27 2020, 7:58 PM.

Details

Summary

This adds some initial support for regions and does not support formatting the specific arguments of a region. For now this can be achieved by using a custom directive that formats the arguments and then parses the region.

Depends On D86759

Diff Detail

Event Timeline

rriddle created this revision.Aug 27 2020, 7:58 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 27 2020, 7:58 PM
rriddle requested review of this revision.Aug 27 2020, 7:58 PM
mehdi_amini accepted this revision.Aug 27 2020, 10:18 PM
mehdi_amini added inline comments.
mlir/docs/OpDefinitions.md
804

Ah seems like you never intended to change this in the grandparent?

mlir/include/mlir/IR/OperationSupport.h
419

The unique_ptr are moved directly in this called and not later, does it contradict the comment?

The comment sounds like this is a no-op if the operation is never constructed.

This revision is now accepted and ready to land.Aug 27 2020, 10:18 PM
rriddle marked an inline comment as done.Aug 28 2020, 3:08 PM
rriddle added inline comments.
mlir/docs/OpDefinitions.md
804

Yeah, that was an accident.

mlir/include/mlir/IR/OperationSupport.h
419

Was just following along the same structure as addRegion, do you have a suggestion?

rriddle updated this revision to Diff 288723.Aug 28 2020, 3:49 PM
rriddle marked an inline comment as done.

Resolve comments

mehdi_amini added inline comments.Aug 28 2020, 6:25 PM
mlir/include/mlir/IR/OperationSupport.h
419

" Take ownership ..." in the first sentence is clear enough to me, what about removing the second part?

rriddle updated this revision to Diff 288754.Aug 28 2020, 7:48 PM
rriddle marked 2 inline comments as done.

Address comment