Refactor OperationName to use virtual tables for dispatch (NFC)
authorMehdi Amini <joker.eph@gmail.com>
Thu, 12 Jan 2023 22:09:42 +0000 (22:09 +0000)
committerMehdi Amini <joker.eph@gmail.com>
Sat, 14 Jan 2023 01:27:38 +0000 (01:27 +0000)
commite055aad5ffb348472c65dfcbede85f39efe8f906
treece73e926ae96f216ff176608426e45619bf3db8a
parentf72601a89f30b066e9c572d3d81bebe6435deae8
Refactor OperationName to use virtual tables for dispatch (NFC)

This streamlines the implementation and makes it so that the virtual tables are in the binary instead of dynamically assembled during initialization.
The dynamic allocation size of op registration is also smaller with this
change.

Differential Revision: https://reviews.llvm.org/D141492
12 files changed:
mlir/include/mlir/IR/ExtensibleDialect.h
mlir/include/mlir/IR/OpDefinition.h
mlir/include/mlir/IR/Operation.h
mlir/include/mlir/IR/OperationSupport.h
mlir/lib/AsmParser/Parser.cpp
mlir/lib/IR/AsmPrinter.cpp
mlir/lib/IR/ExtensibleDialect.cpp
mlir/lib/IR/MLIRContext.cpp
mlir/lib/IR/Operation.cpp
mlir/lib/Rewrite/ByteCode.cpp
mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
mlir/unittests/Interfaces/InferTypeOpInterfaceTest.cpp