[all-commits] [llvm/llvm-project] b1b84a: Pretty print on -dump-pass-pipeline (#143223)

Jeremy Kun via All-commits all-commits at lists.llvm.org
Sun Jun 8 12:24:02 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b1b84a629d5a6d7ed3d4f05077c1db8b6898115b
      https://github.com/llvm/llvm-project/commit/b1b84a629d5a6d7ed3d4f05077c1db8b6898115b
  Author: Jeremy Kun <jkun at google.com>
  Date:   2025-06-08 (Sun, 08 Jun 2025)

  Changed paths:
    M mlir/include/mlir/Pass/Pass.h
    M mlir/include/mlir/Pass/PassManager.h
    M mlir/lib/Pass/Pass.cpp
    M mlir/lib/Pass/PassCrashRecovery.cpp
    M mlir/test/Pass/pipeline-options-parsing.mlir
    M mlir/test/Pass/pipeline-parsing.mlir
    M mlir/test/Pass/run-reproducer.mlir
    M mlir/test/Transforms/composite-pass.mlir
    M mlir/test/Transforms/inlining-dump-default-pipeline.mlir

  Log Message:
  -----------
  Pretty print on -dump-pass-pipeline (#143223)

This PR makes `dump-pass-pipeline` pretty-print the dumped pipeline. For
large pipelines the current behavior produces a wall of text that is
hard to visually navigate.

For the command

```bash
mlir-opt --pass-pipeline="builtin.module(flatten-memref, expand-strided-metadata,func.func(arith-expand,func.func(affine-scalrep)))" --dump-pass-pipeline
```

Before:

```bash
Pass Manager with 3 passes:
builtin.module(flatten-memref,expand-strided-metadata,func.func(arith-expand{include-bf16=false include-f8e8m0=false},func.func(affine-scalrep)))
```

After:

```bash
Pass Manager with 3 passes:
builtin.module(
  flatten-memref,
  expand-strided-metadata,
  func.func(
    arith-expand{include-bf16=false include-f8e8m0=false},
    func.func(
      affine-scalrep
    )
  )
)
```

Another nice feature of this is that the pretty-printed string can still
be copy/pasted into `-pass-pipeline` using a quote:

```bash
$ bin/mlir-opt --dump-pass-pipeline test.mlir --pass-pipeline='
builtin.module(
  flatten-memref,
  expand-strided-metadata,
  func.func(
    arith-expand{include-bf16=false include-f8e8m0=false},
    func.func(
      affine-scalrep
    )
  )
)'
```

---------

Co-authored-by: Jeremy Kun <j2kun at users.noreply.github.com>



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