NFC: refactor ODS builder generation
authorLei Zhang <antiagainst@google.com>
Wed, 31 Jul 2019 22:30:46 +0000 (15:30 -0700)
committerA. Unique TensorFlower <gardener@tensorflow.org>
Wed, 31 Jul 2019 22:31:13 +0000 (15:31 -0700)
commite44ba1f8bf0573da0aa30a9b5bcccfaa63d60a74
treefcec7148763c53aed8ee06c6252bb5cf5ee55b8b
parentcf66d7bb74c482f153cac4715531477e828f4ea4
NFC: refactor ODS builder generation

Previously we use one single method with lots of branches to
generate multiple builders. This makes the method difficult
to follow and modify. This CL splits the method into multiple
dedicated ones, by extracting common logic into helper methods
while leaving logic specific to each builder in their own
methods.

PiperOrigin-RevId: 261011082
mlir/test/mlir-tblgen/op-operand.td
mlir/test/mlir-tblgen/op-result.td
mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp