[mlir][python] Include pipeline parse errors in exception message
authorrkayaith <rkayaith@gmail.com>
Thu, 20 Oct 2022 20:40:32 +0000 (16:40 -0400)
committerrkayaith <rkayaith@gmail.com>
Thu, 27 Oct 2022 17:05:38 +0000 (13:05 -0400)
commitb3c5f6b15b1eaa2552ce62329208ece5166356fe
tree126a5ef036c71227f914f702178bc480a39f4d74
parente7b360fbbbf0a1e06ff0373928ff44abdbeb2fa8
[mlir][python] Include pipeline parse errors in exception message

Currently any errors during pipeline parsing are reported to stderr.
This adds a new pipeline parsing function to the C api that reports
errors through a callback, and updates the python bindings to use it.

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D136402
mlir/include/mlir-c/Pass.h
mlir/lib/Bindings/Python/Pass.cpp
mlir/lib/CAPI/IR/Pass.cpp
mlir/test/CAPI/pass.c
mlir/test/python/pass_manager.py