[all-commits] [llvm/llvm-project] 342d46: [mlir] Add custom directive hooks for printing mix...

MaheshRavishankar via All-commits all-commits at lists.llvm.org
Mon Feb 1 19:04:21 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 342d4662e1c930bd0a856c6c88d0cde5f106cc81
      https://github.com/llvm/llvm-project/commit/342d4662e1c930bd0a856c6c88d0cde5f106cc81
  Author: MaheshRavishankar <ravishankarm at google.com>
  Date:   2021-02-01 (Mon, 01 Feb 2021)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td
    M mlir/include/mlir/Dialect/StandardOps/IR/Ops.td
    M mlir/include/mlir/Interfaces/ViewLikeInterface.h
    M mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
    M mlir/lib/Dialect/StandardOps/IR/Ops.cpp
    M mlir/lib/Interfaces/ViewLikeInterface.cpp
    M mlir/test/Dialect/Linalg/invalid.mlir
    M mlir/tools/mlir-tblgen/OpFormatGen.cpp

  Log Message:
  -----------
  [mlir] Add custom directive hooks for printing mixed integer or value operands.

Add printer and parser hooks for a custom directive that allows
parsing and printing of idioms that can represent a list of values
each of which is either an integer or an SSA value. For example in

`subview %source[%offset_0, 1] [4, %size_1] [%stride_0, 3]`

each of the list (which represents offset, size and strides) is a mix
of either statically know integer values or dynamically computed SSA
values. Since this is used in many places adding a custom directive to
parse/print this idiom allows using assembly format on operations
which use this idiom.

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




More information about the All-commits mailing list