[Mlir-commits] [mlir] [mlir] Declare promised interfaces for all dialects [2/3] (PR #78368)

Oleksandr Alex Zinenko llvmlistbot at llvm.org
Wed Jan 31 01:27:58 PST 2024


================
@@ -63,6 +64,9 @@ void mlir::bufferization::BufferizationDialect::initialize() {
 #include "mlir/Dialect/Bufferization/IR/BufferizationOps.cpp.inc"
       >();
   addInterfaces<BufferizationInlinerInterface>();
+  declarePromisedInterface<func::CallOp, BufferizableOpInterface>();
+  declarePromisedInterface<func::FuncOp, BufferizableOpInterface>();
+  declarePromisedInterface<func::ReturnOp, BufferizableOpInterface>();
----------------
ftynse wrote:

Indeed. @justinfargnoli was it intentional to declare these here for `func`, but not for `arith`, for example?

The general case hits the crux of the issue here, which is "who is allowed to attach (or promise) interfaces for an op". Intuitively, it should be either the "owner" of the op or the "owner" of the interface, but I can see cases where it would be neither of those.

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


More information about the Mlir-commits mailing list