[all-commits] [llvm/llvm-project] 4948b8: [mlir][NFC] Refactor DialectConversion debug logging

River Riddle via All-commits all-commits at lists.llvm.org
Fri Jan 31 12:07:35 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 4948b8b3cf485159da64fca81a9903610a830281
      https://github.com/llvm/llvm-project/commit/4948b8b3cf485159da64fca81a9903610a830281
  Author: River Riddle <riddleriver at gmail.com>
  Date:   2020-01-31 (Fri, 31 Jan 2020)

  Changed paths:
    M mlir/lib/Transforms/DialectConversion.cpp

  Log Message:
  -----------
  [mlir][NFC] Refactor DialectConversion debug logging

Summary:
This revision beefs up the debug logging within dialect conversion. Given the nature of multi-level legalization, and legalization in general, it is one of the harder pieces of infrastructure to debug. This revision adds nice formatting to make the output log easier to parse:

```
Legalizing operation : 'std.constant'(0x608000002420) {
  * Fold {
  } -> FAILURE : unable to fold

  * Pattern : 'std.constant -> ()' {
  } -> FAILURE : pattern failed to match

  * Pattern : 'std.constant -> ()' {
  } -> FAILURE : pattern failed to match

  * Pattern : 'std.constant -> (spv.constant)' {
    ** Insert  : 'spv.constant'(0x608000002c20)
    ** Replace : 'std.constant'(0x608000002420)

    //===-------------------------------------------===//
    Legalizing operation : 'spv.constant'(0x608000002c20) {
    } -> SUCCESS : operation marked legal by the target
    //===-------------------------------------------===//
  } -> SUCCESS : pattern applied successfully
} -> SUCCESS
```

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




More information about the All-commits mailing list