[Mlir-commits] [flang] [mlir] [mlir] Do not merge blocks during canonicalization by default (PR #95057)

Mehdi Amini llvmlistbot at llvm.org
Wed Jun 12 06:06:09 PDT 2024


================
@@ -45,7 +55,8 @@ class GreedyRewriteConfig {
   /// patterns.
   ///
   /// Note: Only applicable when simplifying entire regions.
-  bool enableRegionSimplification = true;
+  GreedySimplifyRegionLevel enableRegionSimplification =
+      GreedySimplifyRegionLevel::Aggressive;
----------------
joker-eph wrote:

> The point is that the initial bug was seen in the rewriter 

My point is that clients of the rewriter for purposes other than canonicalization should decide what they want. I'm rather confident in changing this default for the purpose of canonicalization, I don't think I need to change other usage of the greedy driver right now.

>  Maybe we could set a threshold for the number of block arguments to merge (like I was proposing above)?

That seems like a clunk to me to be honest. I would rather investigate the issue first.

https://github.com/llvm/llvm-project/pull/95057


More information about the Mlir-commits mailing list