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

Scott Todd llvmlistbot at llvm.org
Tue Mar 26 09:14:42 PDT 2024


================
@@ -69,6 +71,10 @@ void ControlFlowDialect::initialize() {
       >();
   addInterfaces<ControlFlowInlinerInterface>();
   declarePromisedInterface<ControlFlowDialect, ConvertToLLVMPatternInterface>();
+  declarePromisedInterfaces<bufferization::BufferizableOpInterface, BranchOp,
+                            CondBranchOp>();
+  declarePromisedInterface<CondBranchOp,
+                           bufferization::BufferDeallocationOpInterface>();
----------------
ScottTodd wrote:

I share some concerns about the layering here. This seems to tightly couple bufferization with potentially unrelated dialects.

We have a pass and test downstream in IREE that started crashing after this change:
* Test: https://github.com/openxla/iree/blob/main/tests/e2e/regression/force_single_dispatch.mlir
* Pass: https://github.com/openxla/iree/blob/main/compiler/src/iree/compiler/Preprocessing/Common/MakeSingleDispatchForFunction.cpp
* Logs: https://github.com/openxla/iree/actions/runs/8425984714/job/23073325026?pr=16891#step:5:2974

As far as I can tell, that code should not be using bufferization.

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


More information about the Mlir-commits mailing list