[mlir][matchers] Add m_Op(StringRef) and m_Attr matchers
authorDevajith V S <devajithvs@gmail.com>
Tue, 11 Apr 2023 20:55:59 +0000 (13:55 -0700)
committerJacques Pienaar <jpienaar@google.com>
Tue, 11 Apr 2023 21:16:14 +0000 (14:16 -0700)
commit8b9f8db501cf9299f3bab5fb669d5f231b3a1aaa
tree08b86350586570d012a0388bbf32e553f7ac87e1
parent718729e9971d4ad12d8c7cb088c661202564cf34
[mlir][matchers] Add m_Op(StringRef) and m_Attr matchers

This patch introduces support for m_Op with a StringRef argument and m_Attr matchers. These matchers will be very useful for mlir-query that is being developed currently.

Submitting this patch separately to reduce the final patch size and make it easier to upstream mlir-query.

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D147262
mlir/include/mlir/IR/Matchers.h
mlir/test/IR/test-matchers.mlir
mlir/test/lib/IR/TestMatchers.cpp