[TableGen] Capture bound source ops in PatternState
authorLei Zhang <antiagainst@google.com>
Mon, 22 Apr 2019 20:40:30 +0000 (13:40 -0700)
committerMehdi Amini <joker.eph@gmail.com>
Wed, 24 Apr 2019 05:01:52 +0000 (22:01 -0700)
commit09b623aa9374c4dc8f53949b85e9d5c84c48cf20
tree0809787b50328448e27de7d8aa90c3d548800c7b
parentf7f2760c30c2243c0cd8c5170859f47697c7bda4
[TableGen] Capture bound source ops in PatternState

    This allows accessing those bound source ops in result patterns, which can be
    useful for invoking native C++ op creation.

    We bind the op entirely here because ops can have multiple results. Design a
    approach to bind to a specific result is not the concern of this commit.

--

PiperOrigin-RevId: 244724750
mlir/include/mlir/TableGen/Pattern.h
mlir/lib/TableGen/Pattern.cpp
mlir/test/mlir-tblgen/pattern-bound-symbol.td
mlir/test/mlir-tblgen/pattern.td
mlir/tools/mlir-tblgen/RewriterGen.cpp