[all-commits] [llvm/llvm-project] 5267f5: [mlir] Add a hook to PatternRewriter to allow for ...
River Riddle via All-commits
all-commits at lists.llvm.org
Tue Mar 17 12:16:50 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 5267f5e6b4cb7ad78680fc33a4414b11d95f4c12
https://github.com/llvm/llvm-project/commit/5267f5e6b4cb7ad78680fc33a4414b11d95f4c12
Author: River Riddle <riddleriver at gmail.com>
Date: 2020-03-17 (Tue, 17 Mar 2020)
Changed paths:
M mlir/include/mlir/IR/PatternMatch.h
M mlir/include/mlir/Transforms/DialectConversion.h
M mlir/lib/Transforms/DialectConversion.cpp
M mlir/test/lib/TestDialect/TestPatterns.cpp
Log Message:
-----------
[mlir] Add a hook to PatternRewriter to allow for patterns to notify why a match failed.
Summary:
This revision adds a new hook, `notifyMatchFailure`, that allows for notifying the rewriter that a match failure is coming with the provided reason. This hook takes as a parameter a callback that fills a `Diagnostic` instance with the reason why the match failed. This allows for the rewriter to decide how this information can be displayed to the end-user, and may completely ignore it if desired(opt mode). For now, DialectConversion is updated to include this information in the debug output.
Differential Revision: https://reviews.llvm.org/D76203
More information about the All-commits
mailing list