[all-commits] [llvm/llvm-project] 4c901b: [mlir] Match Arithmetic::ConstantOp and Tensor::Ex...

Okwan Kwon via All-commits all-commits at lists.llvm.org
Mon Feb 28 15:09:22 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4c901bf4471932852bc872040788c84c0f26d4a6
      https://github.com/llvm/llvm-project/commit/4c901bf4471932852bc872040788c84c0f26d4a6
  Author: Okwan Kwon <okkwon at gmail.com>
  Date:   2022-02-28 (Mon, 28 Feb 2022)

  Changed paths:
    M mlir/include/mlir/Dialect/Tensor/IR/Tensor.h
    M mlir/lib/Dialect/Tensor/IR/TensorOps.cpp
    A mlir/test/Dialect/Tensor/fold-constant-extract-slice.mlir
    M mlir/test/lib/Dialect/Tensor/TestTensorTransforms.cpp

  Log Message:
  -----------
  [mlir] Match Arithmetic::ConstantOp and Tensor::ExtractSliceOp.

Add a pattern matcher for ExtractSliceOp when its source is a constant.

The matching heuristics can be governed by the control function since
generating a new constant is not always beneficial.

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




More information about the All-commits mailing list