Revert "[Canonicalizer] Process regions top-down instead of bottom up & reuse existin...
authorUday Bondhugula <uday@polymagelabs.com>
Thu, 25 Mar 2021 11:23:45 +0000 (16:53 +0530)
committerUday Bondhugula <uday@polymagelabs.com>
Thu, 25 Mar 2021 16:47:26 +0000 (22:17 +0530)
commit0b20413ef6717d914a8b8a9ece86d8eae27c221f
tree0b7b1fd3307c7ee551f7bd46ef73fe6c6eb3bc56
parentd97189600e26553fa4fcdc73bd66b22c0ea420dd
Revert "[Canonicalizer] Process regions top-down instead of bottom up & reuse existing constants."

This reverts commit 361b7d125b438cda13fa45f13790767a62252be9 by Chris
Lattner <clattner@nondot.org> dated Fri Mar 19 21:22:15 2021 -0700.

The change to the greedy rewriter driver picking a different order was
made without adequate analysis of the trade-offs and experimentation. A
change like this has far reaching consequences on transformation
pipelines, and a major impact upstream and downstream. For eg., one
can’t be sure that it doesn’t slow down a large number of cases by small
amounts or create other issues. More discussion here:
https://llvm.discourse.group/t/speeding-up-canonicalize/3015/25

Reverting this so that improvements to the traversal order can be made
on a clean slate, in bigger steps, and higher bar.

Differential Revision: https://reviews.llvm.org/D99329
mlir/include/mlir/Transforms/FoldUtils.h
mlir/include/mlir/Transforms/GreedyPatternRewriteDriver.h
mlir/lib/Transforms/Utils/FoldUtils.cpp
mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp
mlir/test/Conversion/VectorToSCF/vector-to-loops.mlir
mlir/test/Dialect/Affine/canonicalize.mlir
mlir/test/Dialect/Linalg/transform-patterns.mlir
mlir/test/Dialect/Vector/canonicalize.mlir
mlir/test/Transforms/canonicalize.mlir
mlir/test/mlir-tblgen/pattern.mlir