[PATCH] D133614: handling invalidated passes in change printers

Jamie Schmeiser via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 9 13:45:21 PDT 2022


jamieschmeiser created this revision.
jamieschmeiser added a reviewer: aeubanks.
Herald added a subscriber: hiraditya.
Herald added a project: All.
jamieschmeiser requested review of this revision.
Herald added a project: LLVM.

The various change printers do not handle invalidated passes, even though
significant changes may be made to the IR by a pass that invalidates itself.
The reason was that the IR, being invalidated, was not available after the
pass.

Handle this by saving the module and a list of the functions in the module, on
the IR stack used by the print-changed functions, along with representations of
the functions.  When a pass is invalidated, start with the saved module and create
the after representations of the now existing functions, matching and comparing them
with the saved before functions.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D133614

Files:
  llvm/include/llvm/Passes/StandardInstrumentations.h
  llvm/lib/Passes/StandardInstrumentations.cpp
  llvm/test/Other/ChangePrinters/DotCfg/print-changed-dot-cfg-invalidated.ll
  llvm/test/Other/ChangePrinters/DotCfg/print-changed-dot-cfg.ll
  llvm/test/Other/ChangePrinters/print-changed-invalidated.ll
  llvm/test/Other/loop-deletion-printer.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133614.459190.patch
Type: text/x-patch
Size: 42839 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220909/1f326baa/attachment.bin>


More information about the llvm-commits mailing list