Skip to content

[MLIR][DialectConversion] Export isOpIgnored in ConversionPatternRewriter #154300

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions mlir/include/mlir/Transforms/DialectConversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,9 @@ class ConversionPatternRewriter final : public PatternRewriter {
/// Return a reference to the internal implementation.
detail::ConversionPatternRewriterImpl &getImpl();

/// Return "true" if the given operation was replaced or erased.
bool isOpIgnored(Operation *op) const;

private:
// Allow OperationConverter to construct new rewriters.
friend struct OperationConverter;
Expand Down
4 changes: 4 additions & 0 deletions mlir/lib/Transforms/Utils/DialectConversion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2245,6 +2245,10 @@ detail::ConversionPatternRewriterImpl &ConversionPatternRewriter::getImpl() {
return *impl;
}

bool ConversionPatternRewriter::isOpIgnored(Operation *op) const {
return getImpl()->isOpIgnored(op);
}

//===----------------------------------------------------------------------===//
// ConversionPattern
//===----------------------------------------------------------------------===//
Expand Down
Loading