[all-commits] [llvm/llvm-project] 9a028a: [mlir][IR][NFC] `Listener::notifyMatchFailure` ret...
Matthias Springer via All-commits
all-commits at lists.llvm.org
Wed Feb 7 00:00:45 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 9a028afdd655f8e378819e4125292d973985f3f4
https://github.com/llvm/llvm-project/commit/9a028afdd655f8e378819e4125292d973985f3f4
Author: Matthias Springer <me at m-sp.org>
Date: 2024-02-07 (Wed, 07 Feb 2024)
Changed paths:
M mlir/include/mlir/Dialect/Transform/IR/TransformInterfaces.h
M mlir/include/mlir/IR/PatternMatch.h
M mlir/include/mlir/Transforms/DialectConversion.h
M mlir/lib/Dialect/Transform/IR/TransformInterfaces.cpp
M mlir/lib/Transforms/Utils/DialectConversion.cpp
M mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp
Log Message:
-----------
[mlir][IR][NFC] `Listener::notifyMatchFailure` returns `void` (#80704)
There are two `notifyMatchFailure` methods: one in the rewriter and one
in the listener. The one in the rewriter notifies the listener and
returns "failure" for convenience. The one in the listener should not
return anything; it is just a notification. It can currently be abused
to return "success" from the rewriter function. That would be a
violation of the rewriter API rules.
Also make sure that the listener is always notified about match
failures, not just with `NDEBUG`. The current implementation is
consistent: one `notifyMatchFailure` overload notifies only in debug
mode and another one notifies all the time.
More information about the All-commits
mailing list