Add a new hidden option -dot-cfg-changes which creates a website of
DOT files showing colourized changes as the IR is changed by passes
in the new pass manager pipeline.
A new change reporter is introduced that only reports when a pass actually
changes the IR. The hidden option -dot-cfg-changes=<dir> takes a directory
and in that directory a file passes.html will be created. This html
file contains a list of all the passes that act on the IR. Those that
do not change the IR are listed as omitted because of no change, ignored
or filtered out (using -filter-print-func and -filter-passes). Those that
do change the IR are listed as a link to a DOT file which contains a
CFG depiction of the IR (ala -dot-cfg) except that the instructions,
basic blocks and links that are only in the IR before the pass (ie, removed)
and those that are only in the IR after the pass (ie, added) are shown in
red and green, respectively, while the aspects of the CFG that do not change
are shown in black. Additional hidden options -before-color=<dot named
color>, -after-color=<dot named color> and -common-color=<dot named color>
are defined that allow the customization of the colors used in colorizing
the CFG.
This builds upon the template base classes introduced in
https://reviews.llvm.org/D86360 (landed) and expanded in
https://reviews.llvm.org/D87000 (under review). The changes to the GraphWriter in
https://reviews.llvm.org/D86362 have been incorporated into this PR as they are
difficult to understand in isolation and that PR will be cancelled.