[Mlir-commits] [mlir] [mlir][bufferization] Add tensor-like and memref-like interfaces (PR #134220)

Andrei Golubev llvmlistbot at llvm.org
Fri Apr 4 09:36:42 PDT 2025


================
@@ -63,6 +76,16 @@ void mlir::bufferization::BufferizationDialect::initialize() {
 #include "mlir/Dialect/Bufferization/IR/BufferizationOps.cpp.inc"
       >();
   addInterfaces<BufferizationInlinerInterface>();
+
+  assert(getContext() != nullptr);
----------------
andrey-golubev wrote:

dropped the assert. these days i seem to overdo them.

> I'm also relatively confident that the context is never null if you have a live dialect object.

agree. i guess initialization only (normally) happens through dialect loading which happens through the context (i.e. it cannot be invalid here).

https://github.com/llvm/llvm-project/pull/134220


More information about the Mlir-commits mailing list