[all-commits] [llvm/llvm-project] 047c7a: Improve diagnostic when emitting operations with r...

Uday Bondhugula via All-commits all-commits at lists.llvm.org
Thu Sep 8 01:18:32 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 047c7aa96dadf8a2c71a29e2df610d628d9e7e3e
      https://github.com/llvm/llvm-project/commit/047c7aa96dadf8a2c71a29e2df610d628d9e7e3e
  Author: Uday Bondhugula <uday at polymagelabs.com>
  Date:   2022-09-08 (Thu, 08 Sep 2022)

  Changed paths:
    M mlir/include/mlir/IR/Diagnostics.h
    M mlir/lib/IR/Diagnostics.cpp
    M mlir/test/IR/print-op-on-diagnostic.mlir

  Log Message:
  -----------
  Improve diagnostic when emitting operations with regions

This has a broad impact on diagnostics that attach an operation. Ops
with one or more regions will now be printed on a new line. It was
confusing and hard to read with a trailing first line for ops
with regions.

Before:

```
<unknown>:0: note: see current operation: affine.for %arg3 = 0 to 8192 {
  affine.for %arg4 = 0 to 8192 step 512 {
    affine.for %arg5 = 0 to 8192 step 128 {

    ...
```

After:

```
<unknown>:0: note: see current operation:
affine.for %arg3 = 0 to 8192 {
  affine.for %arg4 = 0 to 8192 step 512 {
    affine.for %arg5 = 0 to 8192 step 128 {
      ...
```

Differential Revision: https://reviews.llvm.org/D132645




More information about the All-commits mailing list