[all-commits] [llvm/llvm-project] 2cf666: [MLIR] Make generated markdown doc more consistent...

Kevin Gleason via All-commits all-commits at lists.llvm.org
Tue Feb 11 12:13:25 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2cf6663d3c86b065edeb693815e6a4b325045cc2
      https://github.com/llvm/llvm-project/commit/2cf6663d3c86b065edeb693815e6a4b325045cc2
  Author: Kevin Gleason <gleasonk at google.com>
  Date:   2025-02-11 (Tue, 11 Feb 2025)

  Changed paths:
    M mlir/test/mlir-tblgen/gen-dialect-doc.td
    A mlir/test/mlir-tblgen/gen-pass-doc.td
    M mlir/tools/mlir-tblgen/OpDocGen.cpp
    M mlir/tools/mlir-tblgen/OpInterfacesGen.cpp
    M mlir/tools/mlir-tblgen/PassDocGen.cpp
    M utils/bazel/llvm-project-overlay/mlir/test/mlir-tblgen/BUILD.bazel

  Log Message:
  -----------
  [MLIR] Make generated markdown doc more consistent (#119926)

A few changes to doc generation:

- All summaries are in italics.
- In general each optional block starts and ends with a newline.
- All table elements are enclosed in `|`'s
- Overall reduce the number of >2newlines in a row

Rationale for this change is that our markdown to docs generator
requires a newline before all headers, otherwise it gets inlined into
the line before it, see `### sdy-op-priority-propagate` in the image
below.

<img width="883" alt="image"
src="https://github.com/user-attachments/assets/b795c424-cecb-48df-abbe-aee2030f4491"
/>

That said overall I feel this formatting is more consistent now, here's
a before and after:

- Dialect documentation diff: https://www.diffchecker.com/OVMHoXeL/
- Pass documentation diff: https://www.diffchecker.com/XEJRmW3k/



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list