This is an archive of the discontinued LLVM Phabricator instance.

[mlir][ods] Add description to Attr and ensure doc generation
ClosedPublic

Authored by ftynse on Apr 4 2022, 5:27 AM.

Details

Summary

Add the description textual field to the Attr ODS class to mirror an
identical field in the Type ODS class. Add support for generating
documentation for attribute constraints defined using this field. This
ensures mlir-tblgen produces at least some documentation for dialects
that only define attribute constraints, such as DLTI.

Diff Detail

Event Timeline

ftynse created this revision.Apr 4 2022, 5:27 AM
Herald added a project: Restricted Project. · View Herald Transcript
ftynse requested review of this revision.Apr 4 2022, 5:27 AM
ftynse updated this revision to Diff 420151.Apr 4 2022, 5:34 AM

Actually add the test.

rriddle accepted this revision.Apr 4 2022, 4:13 PM
rriddle added inline comments.
mlir/tools/mlir-tblgen/OpDocGen.cpp
374

Can you spell out auto here?

392–394

Should we be inserting into dialectsWithDocs here as well?

This revision is now accepted and ready to land.Apr 4 2022, 4:13 PM
ftynse updated this revision to Diff 420409.Apr 5 2022, 1:39 AM
ftynse marked 2 inline comments as done.

Address review.

This revision was landed with ongoing or failed builds.Apr 5 2022, 1:40 AM
This revision was automatically updated to reflect the committed changes.