[Mlir-commits] [mlir] [mlir] Declare promised interfaces for all dialects [2/3] (PR #78368)
Justin Fargnoli
llvmlistbot at llvm.org
Thu Feb 1 21:07:11 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>();
----------------
justinfargnoli wrote:
Yes, it was intentional. I was following the format of `registerBufferizableOpInterfaceExternalModels()` - called [here](https://github.com/llvm/llvm-project/blob/7dd790db8b77c4a833c06632e903dc4f13877a64/mlir/include/mlir/InitAllDialects.h#L150) and defined [here](https://github.com/llvm/llvm-project/blob/7dd790db8b77c4a833c06632e903dc4f13877a64/mlir/lib/Dialect/Bufferization/Transforms/FuncBufferizableOpInterfaceImpl.cpp#L490).
My understanding was that this was a dialect extension for the `Bufferization` dialect. Thus, they should be declared in the `Bufferization` dialect's initialization. However, I don't have a good understanding of how dialect extensions work, so I'm likely wrong. (Links to documentation would be greatly appreciated!)
https://github.com/llvm/llvm-project/pull/78368
More information about the Mlir-commits
mailing list