[Mlir-commits] [mlir] [mlir][transform] Improve error message of tracking listener. (PR #66987)
Ingo Müller
llvmlistbot at llvm.org
Thu Sep 21 03:36:32 PDT 2023
================
@@ -1444,16 +1443,20 @@ bool transform::ErrorCheckingTrackingListener::failed() const {
}
void transform::ErrorCheckingTrackingListener::notifyPayloadReplacementNotFound(
- Operation *op, ValueRange values) {
+ Operation *op, ValueRange values, ArrayRef<Operation *> aliveUsers) {
if (status.succeeded()) {
status = emitSilenceableFailure(
- getTransformOp(), "tracking listener failed to find replacement op");
+ getTransformOp(), "op was replaced but replacement was of different "
+ "kind, invalidating alive handles");
----------------
ingomueller-net wrote:
Aha, I see. I guess that that part of the error messages should thus come from `TrackingListener::findReplacementOp`, which currently returns a `FailureOr<Operation *>`. What mechanism can I use here to return the replacment op *and* diagnostics? There is no `DiagnosedSilenceableFailureOr<T>`, AFAIK...
https://github.com/llvm/llvm-project/pull/66987
More information about the Mlir-commits
mailing list