[all-commits] [llvm/llvm-project] 30f224: [mlir] Connect Transform dialect to PDL

ftynse via All-commits all-commits at lists.llvm.org
Thu Apr 21 07:23:26 PDT 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 30f22429d38944e126db75296a1ffc6c12c7b87a
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2022-04-21 (Thu, 21 Apr 2022)

  Changed paths:
    M mlir/include/mlir/Dialect/Transform/IR/TransformDialect.h
    M mlir/include/mlir/Dialect/Transform/IR/TransformDialect.td
    M mlir/include/mlir/Dialect/Transform/IR/TransformInterfaces.h
    M mlir/include/mlir/Dialect/Transform/IR/TransformOps.h
    M mlir/include/mlir/Dialect/Transform/IR/TransformOps.td
    M mlir/lib/Dialect/Transform/IR/CMakeLists.txt
    M mlir/lib/Dialect/Transform/IR/TransformDialect.cpp
    M mlir/lib/Dialect/Transform/IR/TransformInterfaces.cpp
    M mlir/lib/Dialect/Transform/IR/TransformOps.cpp
    M mlir/test/Dialect/Transform/ops-invalid.mlir
    M mlir/test/Dialect/Transform/ops.mlir
    M mlir/test/Dialect/Transform/test-interpreter.mlir
    M mlir/test/lib/Dialect/Transform/TestTransformDialectExtension.cpp
    M mlir/test/lib/Dialect/Transform/TestTransformDialectExtension.td
    M utils/bazel/llvm-project-overlay/mlir/BUILD.bazel

  Log Message:
  [mlir] Connect Transform dialect to PDL

This introduces a pair of ops to the Transform dialect that connect it to PDL
patterns. Transform dialect relies on PDL for matching the Payload IR ops that
are about to be transformed. For this purpose, it provides a container op for
patterns, a "pdl_match" op and transform interface implementations that call
into the pattern matching infrastructure.

To enable the caching of compiled patterns, this also provides the extension
mechanism for TransformState. Extensions allow one to store additional
information in the TransformState and thus communicate it between different
Transform dialect operations when they are applied. They can be added and
removed when applying transform ops. An extension containing a symbol table in
which the pattern names are resolved and a pattern compilation cache is
introduced as the first client.

Depends On D123664

Reviewed By: Mogball

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

More information about the All-commits mailing list