llvm-project
8ffc2560 - [mlir] Move bufferization external models into their own libraries (#236459)

Commit
3 days ago
[mlir] Move bufferization external models into their own libraries (#236459) Prior to this PR the external models for `BufferizableOpInterface`, `BufferDeallocationOpInterface`, `BufferViewFlowOpInterface` and `AllocationOpInterface` lived in each dialect's Transforms library. Every user of an unrelated transform therefore depended on the Bufferization dialect and transforms. This PR moves each model into its own `MLIR<Dialect><Interface>Impl` library such that only users of those library requires dependent libraries to be built. In particular, the Arith, ControlFlow, GPU, MLProgram, SCF and Shape Transforms libraries no longer link MLIRBufferizationDialect or MLIRBufferizationTransforms and MLIRTensorTransforms no longer links MLIRLinalgDialect. This gives 104 targets a smaller link closure, e.g. MLIRControlFlowTransforms (-22 libraries), MLIRMLProgramTransforms (-20), MLIRSCFTransforms (-8) and MLIRTensorTransforms (-7). The Linalg model and the Func model in MLIRBufferizationTransforms stay where they are for now as the require more mechanical changes. A future PR will change them for consistency as well. Migration guide: Out-of-tree users calling a `register*ExternalModels` function directly must link the corresponding new library. Co-authored-by: Claude <noreply@anthropic.com>
Author
Parents
Loading