[PATCH] D91890: Introduce -print-changes which show changes in patch-like format

Jamie Schmeiser via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 20 12:51:54 PST 2020


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

  Introduce -print-changes which prints the changes made by a pass in a patch-like form.
  
  Introduce template base classes that hold a textual represent of the IR
  based on basic blocks and a template base class for comparing this
  representation.  A new change printer is introduced that uses these
  classes to save and compare representations of the IR before and after
  each pass.  It only reports when changes are made by a pass (similar to
  -print-changed) except that the changes are shown in a patch-like format
  with those lines that are removed shown prefixed with '-' and those added
  shown with '+'.  This option was introduced in my tutorial at the virtual
  developer's meeting.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D91890

Files:
  llvm/include/llvm/Passes/StandardInstrumentations.h
  llvm/lib/Passes/StandardInstrumentations.cpp
  llvm/test/Other/ChangePrinters/lit.local.cfg
  llvm/test/Other/ChangePrinters/print-changes.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91890.306766.patch
Type: text/x-patch
Size: 33171 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201120/bbe5086b/attachment.bin>


More information about the llvm-commits mailing list