[all-commits] [llvm/llvm-project] af371f: Reland [GreedPatternRewriter] Preprocess constants...

River Riddle via All-commits all-commits at lists.llvm.org
Thu Apr 7 11:32:16 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: af371f9f98dab48b6374c182f3bc6a18e4faa5fb
      https://github.com/llvm/llvm-project/commit/af371f9f98dab48b6374c182f3bc6a18e4faa5fb
  Author: River Riddle <riddleriver at gmail.com>
  Date:   2022-04-07 (Thu, 07 Apr 2022)

  Changed paths:
    M flang/test/Lower/host-associated.f90
    M mlir/include/mlir/Transforms/FoldUtils.h
    M mlir/lib/Transforms/Utils/FoldUtils.cpp
    M mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp
    M mlir/test/Conversion/VectorToSCF/vector-to-scf.mlir
    M mlir/test/Dialect/Async/async-parallel-for-num-worker-threads.mlir
    M mlir/test/Dialect/Linalg/detensorize_if.mlir
    M mlir/test/Dialect/Linalg/transform-patterns.mlir
    M mlir/test/Dialect/SparseTensor/dense.mlir
    M mlir/test/Dialect/SparseTensor/sparse_scalars.mlir
    M mlir/test/Dialect/Tensor/bufferize.mlir
    M mlir/test/Dialect/Tensor/split-padding.mlir
    M mlir/test/Transforms/test-operation-folder.mlir

  Log Message:
  -----------
  Reland [GreedPatternRewriter] Preprocess constants while building worklist when not processing top down

Reland Note: Adds a fix to properly mark a commutative operation as folded if we change the order
             of its operands. This was uncovered by the fact that we no longer re-process constants.

This avoids accidentally reversing the order of constants during successive
application, e.g. when running the canonicalizer. This helps reduce the number
of iterations, and also avoids unnecessary changes to input IR.

Fixes #51892

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




More information about the All-commits mailing list