[mlir:OpAsm] Factor out the common bits of (Op/Dialect)Asm(Parser/Printer)
authorRiver Riddle <riddleriver@gmail.com>
Fri, 24 Sep 2021 19:56:01 +0000 (19:56 +0000)
committerRiver Riddle <riddleriver@gmail.com>
Fri, 24 Sep 2021 20:12:19 +0000 (20:12 +0000)
commit531206310a27477f088f672f5e6fd688d77d9292
tree453b3c4e7885e6f32d5643d9bbfb128344c1a0b5
parent62cc6b0da2912d770c125fc9ea0949f3a7b75fb9
[mlir:OpAsm] Factor out the common bits of (Op/Dialect)Asm(Parser/Printer)

This has a few benefits:
* It allows for defining parsers/printer code blocks that
  can be shared between operations and attribute/types.
* It removes the weird duplication of generic parser/printer hooks,
  which means that newly added hooks only require touching one class.

Differential Revision: https://reviews.llvm.org/D110375
mlir/include/mlir/IR/DialectImplementation.h
mlir/include/mlir/IR/OpImplementation.h
mlir/lib/IR/AsmPrinter.cpp
mlir/lib/IR/Dialect.cpp
mlir/lib/IR/Operation.cpp
mlir/lib/Parser/AsmParserImpl.h [new file with mode: 0644]
mlir/lib/Parser/DialectSymbolParser.cpp
mlir/lib/Parser/Parser.cpp