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
// Iterate until convergence or until maxIterations. Deletion of the op as
// a result of being dead or folded is convergence.
do {
+ changed = false;
+
// If the operation is trivially dead - remove it.
if (isOpTriviallyDead(op)) {
op->erase();