This is an archive of the discontinued LLVM Phabricator instance.

[mlir][docgen] Only emit class name
ClosedPublic

Authored by jpienaar on Jun 7 2023, 3:43 PM.

Details

Summary

The fully qualified name gets long in the TOC (especially on mobile).

Diff Detail

Event Timeline

jpienaar created this revision.Jun 7 2023, 3:43 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 7 2023, 3:43 PM
jpienaar requested review of this revision.Jun 7 2023, 3:43 PM
rriddle accepted this revision.Jun 7 2023, 3:46 PM
This revision is now accepted and ready to land.Jun 7 2023, 3:46 PM
scotttodd accepted this revision.Jun 7 2023, 3:48 PM
scotttodd added inline comments.
mlir/tools/mlir-tblgen/OpDocGen.cpp
167–169

Are there command line flags or options that can apply to op doc generation? I wonder if anyone would want to choose between these two behaviors. For example, the upstream dialects can have pretty short fully qualified names like ::mlir::math::FloorOp, while in projects like IREE we have longer names like ::mlir::iree_compiler::IREE::Stream::ExecutableOp.

jpienaar updated this revision to Diff 529465.Jun 7 2023, 4:20 PM

Make it optional and set to false initial to be NOP.

jpienaar updated this revision to Diff 529606.Jun 8 2023, 8:33 AM

Flip to enabling specifying a prefix to strip, makes it so that projects could strip a common prefix rather than all or nothing. I think this is most useful for where folks are working in a given namespace. I could also make it an option to just use class name, but this does enable it still just manually.

Flip to enabling specifying a prefix to strip, makes it so that projects could strip a common prefix rather than all or nothing. I think this is most useful for where folks are working in a given namespace. I could also make it an option to just use class name, but this does enable it still just manually.

SGTM. I think this will work well enough in IREE, since we have a tablegen_doc build system function (e.g. https://github.com/openxla/iree/blob/main/build_tools/cmake/iree_tablegen_doc.cmake) that we call for each dialect. We can add flags to each, or add a default that would apply across the project.

This revision was landed with ongoing or failed builds.Jun 12 2023, 8:59 PM
This revision was automatically updated to reflect the committed changes.