HomePhabricator

Fix deletion of operations through the rewriter in a pattern matching a…

Authored by mehdi_amini on Mar 30 2021, 2:11 PM.

Description

Fix deletion of operations through the rewriter in a pattern matching a consumer operation

This allows for the conversion to match A(B()) -> C() with a pattern matching
A and marking B for deletion.

Also add better assertions when an operation is erased while still having uses.

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