[TableGen] Use tblgen::DagLeaf to model DAG arguments
authorLei Zhang <antiagainst@google.com>
Fri, 1 Feb 2019 23:40:22 +0000 (15:40 -0800)
committerjpienaar <jpienaar@google.com>
Fri, 29 Mar 2019 23:06:31 +0000 (16:06 -0700)
commite0774c008fdcee1d4007ede4fde4cf7ad83cfda8
tree8c9fc6e4951157a6cb7d76392f417d1bbe53a799
parent70e3873e86ac578b86e29637a14e44c334be4944
[TableGen] Use tblgen::DagLeaf to model DAG arguments

This CL added a tblgen::DagLeaf wrapper class with several helper methods for handling
DAG arguments. It helps to refactor the rewriter generation logic to be more higher
level.

This CL also added a tblgen::ConstantAttr wrapper class for constant attributes.

PiperOrigin-RevId: 232050683
mlir/include/mlir/TableGen/Attribute.h
mlir/include/mlir/TableGen/Pattern.h
mlir/include/mlir/TableGen/Type.h
mlir/lib/TableGen/Attribute.cpp
mlir/lib/TableGen/Pattern.cpp
mlir/test/mlir-tblgen/one-op-one-result.td
mlir/tools/mlir-tblgen/RewriterGen.cpp