[TableGen] Support benefit score in pattern definition.
authorFeng Liu <fengliuai@google.com>
Fri, 29 Mar 2019 16:36:09 +0000 (09:36 -0700)
committerjpienaar <jpienaar@google.com>
Sat, 30 Mar 2019 00:55:55 +0000 (17:55 -0700)
commit5303587448cf3608b7eda02b0c1cd0ebdf8eb37e
tree1bbae9ea83c4c369b65225666d9aae16c9498ce3
parent094ca64ab06359437524712e65669a10bac816a7
[TableGen] Support benefit score in pattern definition.

A integer number can be specified in the pattern definition and used as the
adjustment to the default benefit score in the generated rewrite pattern C++
definition.

PiperOrigin-RevId: 240994192
mlir/include/mlir/IR/OpBase.td
mlir/include/mlir/TableGen/Pattern.h
mlir/lib/TableGen/Pattern.cpp
mlir/test/mlir-tblgen/pattern-benefit.td [new file with mode: 0644]
mlir/tools/mlir-tblgen/RewriterGen.cpp