[all-commits] [llvm/llvm-project] c8fb6e: [mlir][PatternRewriter] Add a new hook to selectiv...
River Riddle via All-commits
all-commits at lists.llvm.org
Thu Jan 14 12:05:35 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c8fb6ee34151b18bcc9ed1a6b8f502a0b40a414e
https://github.com/llvm/llvm-project/commit/c8fb6ee34151b18bcc9ed1a6b8f502a0b40a414e
Author: River Riddle <riddleriver at gmail.com>
Date: 2021-01-14 (Thu, 14 Jan 2021)
Changed paths:
M mlir/include/mlir/IR/PatternMatch.h
M mlir/include/mlir/Transforms/DialectConversion.h
M mlir/lib/IR/PatternMatch.cpp
M mlir/lib/Transforms/Utils/DialectConversion.cpp
A mlir/test/Transforms/test-pattern-selective-replacement.mlir
M mlir/test/lib/Dialect/Test/TestPatterns.cpp
Log Message:
-----------
[mlir][PatternRewriter] Add a new hook to selectively replace uses of an operation
This revision adds a new `replaceOpWithIf` hook that replaces uses of an operation that satisfy a given functor. If all uses are replaced, the operation gets erased in a similar manner to `replaceOp`. DialectConversion support will be added in a followup as this requires adjusting how replacements are tracked there.
Differential Revision: https://reviews.llvm.org/D94632
More information about the All-commits
mailing list