[Mlir-commits] [mlir] [mlir][bufferize] Fix broken implementation of denyDialect (PR #85881)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Tue Mar 19 17:30:02 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir
Author: Matteo Franciolini (mfrancio)
<details>
<summary>Changes</summary>
The current implementation is not functional and does not compile. The
patch allows to correctly mark a dialect as denied for the purpose of
bufferization.
---
Full diff: https://github.com/llvm/llvm-project/pull/85881.diff
1 Files Affected:
- (modified) mlir/include/mlir/Dialect/Bufferization/IR/BufferizableOpInterface.h (+10)
``````````diff
diff --git a/mlir/include/mlir/Dialect/Bufferization/IR/BufferizableOpInterface.h b/mlir/include/mlir/Dialect/Bufferization/IR/BufferizableOpInterface.h
index 94d5c08dfe4575..3a61a4b34765e2 100644
--- a/mlir/include/mlir/Dialect/Bufferization/IR/BufferizableOpInterface.h
+++ b/mlir/include/mlir/Dialect/Bufferization/IR/BufferizableOpInterface.h
@@ -147,6 +147,16 @@ class OpFilter {
entries.push_back(Entry{filterFn, Entry::FilterType::ALLOW});
}
+ /// Deny the given dialect.
+ ///
+ /// This function adds a DENY entry.
+ void denyDialect(StringRef dialectNamespace) {
+ Entry::FilterFn filterFn = [=](Operation *op) {
+ return op->getDialect()->getNamespace() == dialectNamespace;
+ };
+ entries.push_back(Entry{filterFn, Entry::FilterType::DENY});
+ }
+
/// Allow the given ops.
///
/// This function adds one or multiple ALLOW entries.
``````````
</details>
https://github.com/llvm/llvm-project/pull/85881
More information about the Mlir-commits
mailing list