[PATCH] D87202: Add a new hidden option -cfg-dot-changed which creates a website of DOT files showing colourized changes as the IR is changed by passes in the new pass manager pipeline.

Jamie Schmeiser via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 5 21:59:52 PDT 2020


jamieschmeiser created this revision.
jamieschmeiser added reviewers: madhur13490, aeubanks, yrouban, ychen.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.
jamieschmeiser requested review of this revision.

Add a new hidden option -cfg-dot-changed 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 -cfg-dot-changed=<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, expanded in https://reviews.llvm.org/D87000 and also the changes to the GraphWriter in https://reviews.llvm.org/D86362 (all of which are currently under review).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D87202

Files:
  llvm/include/llvm/IR/ChangeReporters.h
  llvm/include/llvm/Passes/StandardInstrumentations.h
  llvm/lib/IR/ChangeReporters.cpp
  llvm/lib/Passes/StandardInstrumentations.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87202.290122.patch
Type: text/x-patch
Size: 46365 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200906/92d2374f/attachment.bin>


More information about the llvm-commits mailing list