[all-commits] [llvm/llvm-project] 77eee5: [mlir] Refactor DialectRegistry delayed interface ...
River Riddle via All-commits
all-commits at lists.llvm.org
Wed Mar 16 22:51:35 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 77eee5795e2cf753e4400fb089d01018417c4ee0
https://github.com/llvm/llvm-project/commit/77eee5795e2cf753e4400fb089d01018417c4ee0
Author: River Riddle <riddleriver at gmail.com>
Date: 2022-03-16 (Wed, 16 Mar 2022)
Changed paths:
M mlir/include/mlir/IR/Dialect.h
A mlir/include/mlir/IR/DialectRegistry.h
M mlir/lib/Dialect/Arithmetic/Transforms/BufferizableOpInterfaceImpl.cpp
M mlir/lib/Dialect/Bufferization/Transforms/BufferDeallocation.cpp
M mlir/lib/Dialect/Linalg/ComprehensiveBufferize/ModuleBufferization.cpp
M mlir/lib/Dialect/Linalg/Transforms/BufferizableOpInterfaceImpl.cpp
M mlir/lib/Dialect/SCF/Transforms/BufferizableOpInterfaceImpl.cpp
M mlir/lib/Dialect/Shape/Transforms/BufferizableOpInterfaceImpl.cpp
M mlir/lib/Dialect/Tensor/IR/TensorInferTypeOpInterfaceImpl.cpp
M mlir/lib/Dialect/Tensor/IR/TensorTilingInterfaceImpl.cpp
M mlir/lib/Dialect/Tensor/Transforms/BufferizableOpInterfaceImpl.cpp
M mlir/lib/Dialect/Vector/Transforms/BufferizableOpInterfaceImpl.cpp
M mlir/lib/IR/Dialect.cpp
M mlir/lib/IR/MLIRContext.cpp
M mlir/lib/Target/LLVMIR/Dialect/AMX/AMXToLLVMIRTranslation.cpp
M mlir/lib/Target/LLVMIR/Dialect/ArmNeon/ArmNeonToLLVMIRTranslation.cpp
M mlir/lib/Target/LLVMIR/Dialect/ArmSVE/ArmSVEToLLVMIRTranslation.cpp
M mlir/lib/Target/LLVMIR/Dialect/LLVMIR/LLVMToLLVMIRTranslation.cpp
M mlir/lib/Target/LLVMIR/Dialect/NVVM/NVVMToLLVMIRTranslation.cpp
M mlir/lib/Target/LLVMIR/Dialect/OpenACC/OpenACCToLLVMIRTranslation.cpp
M mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
M mlir/lib/Target/LLVMIR/Dialect/ROCDL/ROCDLToLLVMIRTranslation.cpp
M mlir/lib/Target/LLVMIR/Dialect/X86Vector/X86VectorToLLVMIRTranslation.cpp
M mlir/unittests/IR/DialectTest.cpp
M mlir/unittests/IR/InterfaceAttachmentTest.cpp
Log Message:
-----------
[mlir] Refactor DialectRegistry delayed interface support into a general DialectExtension mechanism
The current dialect registry allows for attaching delayed interfaces, that are added to attrs/dialects/ops/etc.
when the owning dialect gets loaded. This is clunky for quite a few reasons, e.g. each interface type has a
separate tracking structure, and is also quite limiting. This commit refactors this delayed mutation of
dialect constructs into a more general DialectExtension mechanism. This mechanism is essentially a registration
callback that is invoked when a set of dialects have been loaded. This allows for attaching interfaces directly
on the loaded constructs, and also allows for loading new dependent dialects. The latter of which is
extremely useful as it will now enable dependent dialects to only apply in the contexts in which they
are necessary. For example, a dialect dependency can now be conditional on if a user actually needs the
interface that relies on it.
Differential Revision: https://reviews.llvm.org/D120367
More information about the All-commits
mailing list