HomePhabricator

[mlir] Fix exiting OpPatternRewriteDriver::simplifyLocally after first…

Authored by csigg on Oct 22 2020, 11:29 PM.

Description

[mlir] Fix exiting OpPatternRewriteDriver::simplifyLocally after first iteration that didn't change the op.

Before this change, we would run maxIterations if the first iteration changed the op.
After this change, we exit the loop as soon as an iteration hasn't changed the op.
Assuming that we have reached a fixed point when an iteration doesn't change the op, this doesn't affect correctness.

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D89981