[all-commits] [llvm/llvm-project] 64ce90: [mlir] Add a new `print-ir-after-failure` IR pass ...
River Riddle via All-commits
all-commits at lists.llvm.org
Wed May 19 17:03:35 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 64ce90e1af5c38822b7730bb6f21ed3d99f2f364
https://github.com/llvm/llvm-project/commit/64ce90e1af5c38822b7730bb6f21ed3d99f2f364
Author: River Riddle <riddleriver at gmail.com>
Date: 2021-05-19 (Wed, 19 May 2021)
Changed paths:
M mlir/docs/PassManagement.md
M mlir/include/mlir/Pass/PassManager.h
M mlir/lib/Pass/IRPrinting.cpp
M mlir/lib/Pass/PassManagerOptions.cpp
M mlir/test/Pass/ir-printing.mlir
M mlir/test/lib/Pass/TestPassManager.cpp
Log Message:
-----------
[mlir] Add a new `print-ir-after-failure` IR pass printing flag
This flag will print the IR after a pass only in the case where the pass failed. This can be useful to more easily view the invalid IR, without needing to print after every pass in the pipeline.
Differential Revision: https://reviews.llvm.org/D101853
Commit: 92469ca027b2e794aa9162931665b379445ca711
https://github.com/llvm/llvm-project/commit/92469ca027b2e794aa9162931665b379445ca711
Author: River Riddle <riddleriver at gmail.com>
Date: 2021-05-19 (Wed, 19 May 2021)
Changed paths:
M mlir/docs/PassManagement.md
M mlir/include/mlir/Pass/PassManager.h
M mlir/lib/Pass/CMakeLists.txt
M mlir/lib/Pass/Pass.cpp
A mlir/lib/Pass/PassCrashRecovery.cpp
M mlir/lib/Pass/PassDetail.h
M mlir/test/Pass/crash-recovery.mlir
Log Message:
-----------
[mlir] Refactor the implementation of pass crash reproducers
The current implementation has several key limitations and weirdness, e.g local reproducers don't support dynamic pass pipelines, error messages don't include the passes that failed, etc. This revision refactors the implementation to support more use cases, and also be much cleaner.
The main change in this revision, aside from moving the implementation out of Pass.cpp and into its own file, is the addition of a crash recovery pass instrumentation. For local reproducers, this instrumentation handles setting up the recovery context before executing each pass. For global reproducers, the instrumentation is used to provide a more detailed error message, containing information about which passes are running and on which operations.
Example of new message:
```
error: Failures have been detected while processing an MLIR pass pipeline
note: Pipeline failed while executing [`TestCrashRecoveryPass` on 'module' operation: @foo]: reproducer generated at `crash-recovery.mlir.tmp`
```
Differential Revision: https://reviews.llvm.org/D101854
Compare: https://github.com/llvm/llvm-project/compare/ac06f6d06de4...92469ca027b2
More information about the All-commits
mailing list