[all-commits] [llvm/llvm-project] 351326: [mlir] Add op printing flag to skip regions (#77726)

Jakub Kuderski via All-commits all-commits at lists.llvm.org
Thu Jan 11 14:52:53 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3513267770802b79fe5c020cf651942678b1e951
      https://github.com/llvm/llvm-project/commit/3513267770802b79fe5c020cf651942678b1e951
  Author: Jakub Kuderski <jakub at nod-labs.com>
  Date:   2024-01-11 (Thu, 11 Jan 2024)

  Changed paths:
    M mlir/lib/IR/AsmPrinter.cpp
    A mlir/test/IR/print-skip-regions.mlir

  Log Message:
  -----------
  [mlir] Add op printing flag to skip regions (#77726)

The new flag, `--mlir-print-skip-regions`, sets the op printing option
that disables region printing. This results in the usual
`--mlir-print-ir-*` debug options printing only the names of the
executed passes and the signatures of the ops.

Example:
```mlir
// -----// IR Dump Before CSE (cse) //----- //
func.func @bar(%arg0: f32, %arg1: f32) -> f32 {...}

// -----// IR Dump Before Canonicalizer (canonicalize) //----- //
func.func @bar(%arg0: f32, %arg1: f32) -> f32 {...}
```

The main use-case is to be triage compilation issues (crashes, slowness)
on very deep pass pipelines and with very large IR files, where printing
IR is prohibitively slow otherwise.




More information about the All-commits mailing list