[all-commits] [llvm/llvm-project] b4001a: [mlir-tblgen] Fix failed matching when binds same ...

ChiaHungDuan via All-commits all-commits at lists.llvm.org
Tue Jul 20 00:45:33 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b4001ae8851f47406f8187b72b0253b21bf1da4c
      https://github.com/llvm/llvm-project/commit/b4001ae8851f47406f8187b72b0253b21bf1da4c
  Author: Chia-hung Duan <chiahungduan at google.com>
  Date:   2021-07-20 (Tue, 20 Jul 2021)

  Changed paths:
    M mlir/include/mlir/TableGen/Pattern.h
    M mlir/lib/TableGen/Pattern.cpp
    M mlir/test/lib/Dialect/Test/TestOps.td
    M mlir/test/mlir-tblgen/pattern.mlir
    M mlir/tools/mlir-tblgen/RewriterGen.cpp

  Log Message:
  -----------
  [mlir-tblgen] Fix failed matching when binds same operand of an op in different depth

For example, we will generate incorrect code for the pattern,

def : Pat<((FooOp (FooOp, $a, $b), $b)), (...)>;

We didn't allow $b to be bond twice with same operand of same op.

Reviewed By: jpienaar

Differential Revision: https://reviews.llvm.org/D105677




More information about the All-commits mailing list