A scope was added to the GreedyPatternRewriteDriver in D140304. This scope prevents ops from being added to the worklist if they are not inside regions.
The reason why IsIsolatedFromAbove was necessary:
// Collects all the operands and result uses of the given `op` into work // list. Also remove `op` and nested ops from worklist. originalOperands.assign(op->operand_begin(), op->operand_end()); auto preReplaceAction = [&](Operation *op) { // Add the operands to the worklist for visitation. addOperandsToWorklist(originalOperands); // ... }
Depends On: D140304