A new hidden option test-changed=exe that calls exe after each time IR changes
authorJamie Schmeiser <schmeise@ca.ibm.com>
Wed, 8 Dec 2021 19:22:54 +0000 (14:22 -0500)
committerJamie Schmeiser <schmeise@ca.ibm.com>
Wed, 8 Dec 2021 19:23:31 +0000 (14:23 -0500)
commitf9235e45fd1f5ca21f95105427184a6afd0f9d95
tree9a6ada033d9ae048e72da5b060afa3c62506f9c8
parentd8fce785de8e5604ad359360c4f680d9013a5f48
A new hidden option test-changed=exe that calls exe after each time IR changes

Summary:
A new option test-changed is defined that allows one to specify an
exe that is called after each pass in the opt pipeline that changes the IR.
The test-changed=exe option saves the IR in a temporary file and calls exe
with the name of the file and the name of the pass that just changed it after
each pass alters the IR. exe is also called with the initial IR. This
can be used, for example, to determine which pass corrupts the IR by having
exe as a script that calls llc and runs a test to see after which pass the
results change. The print-changed filtering options are respected.

Author: Jamie Schmeiser <schmeise@ca.ibm.com>
Reviewed By: aeubanks (Arthur Eubanks)
Differential Revision: https://reviews.llvm.org/D110776
llvm/include/llvm/Passes/StandardInstrumentations.h
llvm/lib/Passes/StandardInstrumentations.cpp
llvm/test/Other/test-changed-script.sh [new file with mode: 0755]
llvm/test/Other/test-changed.ll [new file with mode: 0644]