forked from OSchip/llvm-project
[MLIR] Fix iteration counting in greedy pattern application
Previously, checking that a fix point is reached was counted as a full iteration. As this "iteration" never changes the IR, this seems counter- intuitive. Differential Revision: https://reviews.llvm.org/D123641
This commit is contained in:
parent
e80ee1829c
commit
673e9828be
|
@ -274,7 +274,7 @@ bool GreedyPatternRewriteDriver::simplify(MutableArrayRef<Region> regions) {
|
|||
if (config.enableRegionSimplification)
|
||||
changed |= succeeded(simplifyRegions(*this, regions));
|
||||
} while (changed &&
|
||||
(++iteration < config.maxIterations ||
|
||||
(iteration++ < config.maxIterations ||
|
||||
config.maxIterations == GreedyRewriteConfig::kNoIterationLimit));
|
||||
|
||||
// Whether the rewrite converges, i.e. wasn't changed in the last iteration.
|
||||
|
|
Loading…
Reference in New Issue