- 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 of D145226, which was reverted (9979417d4db4) due to a memory leak. The memory leak is unrelated to this change and fixed with D154185.
Depends On: D154185
This is a cascading for/if case that we omit braces: https://llvm.org/docs/CodingStandards.html#don-t-use-braces-on-simple-single-statement-bodies-of-if-else-loop-statements