[Mlir-commits] [mlir] [mlir][capi] make MLIR Pass C-API type safe (PR #121284)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Sun Dec 29 01:43:20 PST 2024
https://github.com/SpriteOvO commented:
First of all, the renaming is a breaking change, if we do want to align the convention, we should also keep the old one and comment _deprecated_ on it.
Second, `MlirExternalPass` is not supposed to be constructed from an external program. It is used in the `run` callback field in `MlirExternalPassCallbacks`, which is a callback parameter, external programs provides a callback function pointer which receives a `MlirExternalPass` passed from MLIR, and signal failure via `mlirExternalPassSignalFailure` if the pass implementation encountered any failure.
See the test cases for examples https://github.com/llvm/llvm-project/blob/66dd7e63d8a1860c11f3b9acf011cad4e18f0195/mlir/test/CAPI/pass.c#L309-L336
https://github.com/llvm/llvm-project/pull/121284
More information about the Mlir-commits
mailing list