[Mlir-commits] [mlir] [mlir] Enable decoupling two kinds of greedy behavior. (PR #104649)

Mehdi Amini llvmlistbot at llvm.org
Wed Aug 28 16:47:55 PDT 2024


================
@@ -840,6 +840,11 @@ LogicalResult RegionPatternRewriteDriver::simplify(bool *changed) && {
     // regions to enable more aggressive CSE'ing).
     OperationFolder folder(ctx, this);
     auto insertKnownConstant = [&](Operation *op) {
+      // This hoisting is to enable more folding, so skip checking if known
+      // constant, updating dense map etc if not doing folding.
+      if (!config.fold)
----------------
joker-eph wrote:

I am quite concern with the accumulation of flags: this seems to me like working around problems instead of addressing them, and adding complexity that I don't see manageable on the long term.


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


More information about the Mlir-commits mailing list