Emit matchAndRewrite() for declarative rewrite rules
authorLei Zhang <antiagainst@google.com>
Tue, 6 Aug 2019 14:09:55 +0000 (07:09 -0700)
committerA. Unique TensorFlower <gardener@tensorflow.org>
Tue, 6 Aug 2019 14:11:08 +0000 (07:11 -0700)
commit60f78453d7e88fbd15dc03e83cf95e7b210a2f2c
tree082154d34da8bede4e67ee702cec38ad00cd7db8
parentcd1c488ecdc952c50d6d999652b90872d6e861f6
Emit matchAndRewrite() for declarative rewrite rules

Previously we are emitting separate match() and rewrite()
methods, which requires conveying a match state struct
in a unique_ptr across these two methods. Changing to
emit matchAndRewrite() simplifies the picture.

PiperOrigin-RevId: 261906804
mlir/tools/mlir-tblgen/RewriterGen.cpp