[all-commits] [llvm/llvm-project] d75a61: [mlir] Update `simplifyRegions` to use RewriterBas...

River Riddle via All-commits all-commits at lists.llvm.org
Fri Mar 19 16:40:37 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d75a611afbc7c5f8c343e0398dd2b506684e506b
      https://github.com/llvm/llvm-project/commit/d75a611afbc7c5f8c343e0398dd2b506684e506b
  Author: River Riddle <riddleriver at gmail.com>
  Date:   2021-03-19 (Fri, 19 Mar 2021)

  Changed paths:
    M mlir/include/mlir/Transforms/RegionUtils.h
    M mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp
    M mlir/lib/Transforms/Utils/RegionUtils.cpp
    M mlir/test/Dialect/SCF/canonicalize.mlir

  Log Message:
  -----------
  [mlir] Update `simplifyRegions` to use RewriterBase for erasure notifications

This allows for notifying callers when operations/blocks get erased, which is especially useful for the greedy pattern driver. The current greedy pattern driver "throws away" all information on constants in the operation folder because it doesn't know if they get erased or not. By passing in RewriterBase, we can directly track this and prevent the need for the pattern driver to rediscover all of the existing constants. In some situations this cuts the compile time of the canonicalizer in half.

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




More information about the All-commits mailing list