[Mlir-commits] [mlir] 5773061 - [mlir][bufferization] Fix OpFilter not to crash on unloaded dialects

Benjamin Kramer llvmlistbot at llvm.org
Tue Mar 19 03:41:10 PDT 2024


Author: Benjamin Kramer
Date: 2024-03-19T11:40:58+01:00
New Revision: 577306133e14fc4f448b010920dc446607fcabaf

URL: https://github.com/llvm/llvm-project/commit/577306133e14fc4f448b010920dc446607fcabaf
DIFF: https://github.com/llvm/llvm-project/commit/577306133e14fc4f448b010920dc446607fcabaf.diff

LOG: [mlir][bufferization] Fix OpFilter not to crash on unloaded dialects

Added: 
    

Modified: 
    mlir/include/mlir/Dialect/Bufferization/IR/BufferizableOpInterface.h

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/Dialect/Bufferization/IR/BufferizableOpInterface.h b/mlir/include/mlir/Dialect/Bufferization/IR/BufferizableOpInterface.h
index d8cfeee2466360..94d5c08dfe4575 100644
--- a/mlir/include/mlir/Dialect/Bufferization/IR/BufferizableOpInterface.h
+++ b/mlir/include/mlir/Dialect/Bufferization/IR/BufferizableOpInterface.h
@@ -142,7 +142,7 @@ class OpFilter {
   /// This function adds an ALLOW entry.
   void allowDialect(StringRef dialectNamespace) {
     Entry::FilterFn filterFn = [=](Operation *op) {
-      return op->getDialect()->getNamespace() == dialectNamespace;
+      return op->getName().getDialectNamespace() == dialectNamespace;
     };
     entries.push_back(Entry{filterFn, Entry::FilterType::ALLOW});
   }


        


More information about the Mlir-commits mailing list