[PATCH] D77487: [MLIR] Introduce applyOpPatternsAndFold for op local rewrites

River Riddle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 10 23:57:44 PDT 2020


rriddle requested changes to this revision.
rriddle added a comment.
This revision now requires changes to proceed.

Can you add test coverage?



================
Comment at: mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp:329
+      return true;
+  } while (changed && ++i < maxIterations);
+
----------------
bondhugula wrote:
> rriddle wrote:
> > ```
> > while (!erased && changed && ...)
> > ```
> > 
> > ?
> That won't be accurate since although you'll correctly exit the iteration and return, you will be returning !changed, which will be false instead of being true (i.e., the driver has converged).
Ah yeah, duh. Thanks.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77487/new/

https://reviews.llvm.org/D77487





More information about the llvm-commits mailing list