- All IR modifications are done with a rewriter.
- The new C++ entry point takes a RewriterBase &, which may have a listener attached to it.
This revision is useful because it allows users to run CSE and track IR modifications via a listener that can be attached to the rewriter.
This is a reupload. The original CL was reverted (9979417d4db4) due to a memory leak. The memory leak is unrelated to this change and fixed with D154185.
Depends On: D154185
Shouldn't this function takes an optional DominanceInfo here?
We could then call this from the runOnOperation()