[PATCH] D77487: [MLIR] Introduce applyOpPatternsAndFold for op local rewrites
Uday Bondhugula via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 10 01:03:27 PDT 2020
bondhugula added a comment.
Thanks for the review.
================
Comment at: mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp:253
+
+namespace {
+/// This is a simple driver for the PatternMatcher to apply patterns and perform
----------------
rriddle wrote:
> Can you use a comment block to split these?
Not sure I understood it right - but PTAL at what I did.
================
Comment at: mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp:329
+ return true;
+ } while (changed && ++i < maxIterations);
+
----------------
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).
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