[mlir] Add an option to still use bottom-up traversal
authorAdrian Kuegel <akuegel@google.com>
Mon, 22 Mar 2021 08:42:57 +0000 (09:42 +0100)
committerAdrian Kuegel <akuegel@google.com>
Mon, 22 Mar 2021 08:49:44 +0000 (09:49 +0100)
commitc691b9686b77c0f76e889a8c52a9c53be4e778e4
treea725fe1e1733019bb8ad1452d659b7a74441b45d
parent82f6e0dde29e6c6da27f64db5992eb539a57d21b
[mlir] Add an option to still use bottom-up traversal

GreedyPatternRewriteDriver was changed from bottom-up traversal to top-down traversal. Not all passes work yet with that change for traversal order. To give some time for fixing, add an option to allow to switch back to bottom-up traversal. Use this option in FusionOfTensorOpsPass which fails otherwise.

Differential Revision: https://reviews.llvm.org/D99059
mlir/include/mlir/Transforms/GreedyPatternRewriteDriver.h
mlir/lib/Dialect/Linalg/Transforms/FusionOnTensors.cpp
mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp