Fix RewriterGen to support using NativeCodeCall as auxiliary pattern
authorLei Zhang <antiagainst@google.com>
Thu, 17 Oct 2019 15:39:13 +0000 (08:39 -0700)
committerA. Unique TensorFlower <gardener@tensorflow.org>
Thu, 17 Oct 2019 15:39:59 +0000 (08:39 -0700)
commit603117b2d62b320e86d3452fa0b9f7b00d125574
tree202c13cc53476758c79c0f8b9e78755f7ac5c25a
parent1358df19ca73165cdbd64d099cb5c7ccfd23e477
Fix RewriterGen to support using NativeCodeCall as auxiliary pattern

NativeCodeCall is handled differently than normal op creation in RewriterGen
(because its flexibility). It will only be materialized to output stream if
it is used. But when using it for auxiliary patterns, we still want the side
effect even if it is not replacing matched root op's results.

PiperOrigin-RevId: 275265467
mlir/test/lib/TestDialect/TestOps.td
mlir/test/lib/TestDialect/TestPatterns.cpp
mlir/test/mlir-tblgen/pattern.mlir
mlir/tools/mlir-tblgen/RewriterGen.cpp