[all-commits] [llvm/llvm-project] 0ddd04: [MLIR] Fix op folding to not run pre-replace when ...

Uday Bondhugula via All-commits all-commits at lists.llvm.org
Thu Mar 19 19:20:09 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 0ddd04391d281b1d8679ff95ddfce79a61253250
      https://github.com/llvm/llvm-project/commit/0ddd04391d281b1d8679ff95ddfce79a61253250
  Author: Uday Bondhugula <uday at polymagelabs.com>
  Date:   2020-03-20 (Fri, 20 Mar 2020)

  Changed paths:
    M mlir/lib/Transforms/Utils/FoldUtils.cpp

  Log Message:
  -----------
  [MLIR] Fix op folding to not run pre-replace when not constant folding

 OperationFolder::tryToFold was running the pre-replacement
action even when there was no constant folding, i.e., when the operation
was just being updated in place but was not going to be replaced. This
led to nested ops being unnecessarily removed from the worklist and only
being processed in the next outer iteration of the greedy pattern
rewriter, which is also why this didn't affect the final output IR but
only the convergence rate. It also led to an op's results' users to be
unnecessarily added to the worklist.

Signed-off-by: Uday Bondhugula <uday at polymagelabs.com>

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




More information about the All-commits mailing list