[mlir] Reduce call stack depth in LogicalResult. NFC.
authorJakub Kuderski <kubak@google.com>
Tue, 4 Oct 2022 01:58:48 +0000 (21:58 -0400)
committerJakub Kuderski <kubak@google.com>
Tue, 4 Oct 2022 01:59:02 +0000 (21:59 -0400)
commit247c84aef6eb8266a9c286f9bbde5f7bb0588cbc
tree31d413291c5a8004be6d006bb1900d8689aca5b9
parentde471fee278cb8ddb287c54755588070e273e780
[mlir] Reduce call stack depth in LogicalResult. NFC.

When debuging a crash or conversion failure in a deep pass pipeline,
there are often many interleaved frames with `failed` and `succeeded`.
`LogicalResult` is used through the pass infrastructure, so by not implementing
failure in terms of a call to succeess, this patch noticeably reduces the total
total call stack depth and improves the debugging experience.

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D135116
mlir/include/mlir/Support/LogicalResult.h