[#llvm-ChangeReporter-00] = xref:llvm.adoc[llvm]::ChangeReporter :relfileprefix: ../ :mrdocs: Base class for reporting IR changes under the new pass manager. == Synopsis Declared in `<llvm/Passes/StandardInstrumentations.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<typename IRUnitT> class ChangeReporter; ---- == Description It presents an interface for such classes and provides calls on various events as the new pass manager transforms the IR. It also provides filtering of information based on hidden options specifying which functions are interesting. Calls are made for the following events/queries: 1. The initial IR processed. 2. To get the representation of the IR (of type `T).` 3. When a pass does not change the IR. 4. When a pass changes the IR (given both before and after representations of type `T).` 5. When an IR is invalidated. 6. When a pass is run on an IR that is not interesting (based on options). 7. When a pass is ignored (pass manager or adapter pass). 8. To compare two IR representations (of type `T).` == Member Functions [cols="1,4"] |=== | Name| Description | xref:llvm/ChangeReporter-00/2destructor.adoc[`~ChangeReporter`] [.small]#[destructor]# [.small]#[virtual]# | Destroy this change reporter. | xref:llvm/ChangeReporter-00/handleIRAfterPass.adoc[`handleIRAfterPass`] | Compare saved before‐IR with `IR` after `PassID` runs. | xref:llvm/ChangeReporter-00/handleInvalidatedPass.adoc[`handleInvalidatedPass`] | Handle invalidation of the IR for `PassID.` | xref:llvm/ChangeReporter-00/saveIRBeforePass.adoc[`saveIRBeforePass`] | Save `IR` before `PassID` when the pass/IR is interesting. |=== == Protected Member Functions [cols="1,4"] |=== | Name| Description | xref:llvm/ChangeReporter-00/2constructor.adoc[`ChangeReporter`] [.small]#[constructor]# | Construct a change reporter with the given verbosity. | xref:llvm/ChangeReporter-00/generateIRRepresentation.adoc[`generateIRRepresentation`] [.small]#[virtual]# | Fill `Output` with the representation of `IR` for `PassID.` | xref:llvm/ChangeReporter-00/handleAfter.adoc[`handleAfter`] [.small]#[virtual]# | Report that interesting IR for `PassID/Name` changed. | xref:llvm/ChangeReporter-00/handleFiltered.adoc[`handleFiltered`] [.small]#[virtual]# | Report that `PassID/Name` was filtered out as uninteresting. | xref:llvm/ChangeReporter-00/handleIgnored.adoc[`handleIgnored`] [.small]#[virtual]# | Report that ignored pass `PassID` ran on `Name.` | xref:llvm/ChangeReporter-00/handleInitialIR.adoc[`handleInitialIR`] [.small]#[virtual]# | Handle the first IR unit processed by this reporter. | xref:llvm/ChangeReporter-00/handleInvalidated.adoc[`handleInvalidated`] [.small]#[virtual]# | Report that an interesting pass `PassID` was invalidated. | xref:llvm/ChangeReporter-00/omitAfter.adoc[`omitAfter`] [.small]#[virtual]# | Report that interesting IR for `PassID/Name` did not change. | xref:llvm/ChangeReporter-00/registerRequiredCallbacks.adoc[`registerRequiredCallbacks`] | Register the before/after/invalidate callbacks required by this reporter. |=== == Protected Data Members [cols="1,4"] |=== | Name| Description | xref:llvm/ChangeReporter-00/BeforeStack.adoc[`BeforeStack`] | Stack of IR representations saved before passes. | xref:llvm/ChangeReporter-00/InitialIR.adoc[`InitialIR`] | Whether the next IR seen is the first one processed. | xref:llvm/ChangeReporter-00/VerboseMode.adoc[`VerboseMode`] | When true, print every interesting event rather than only changes. |=== == Derived Classes [cols="1,4"] |=== | Name| Description | xref:llvm/DotCfgChangeReporter.adoc[`DotCfgChangeReporter`] | Builds a website with PDF CFGs highlighting changed instructions. | xref:llvm/TextChangeReporter-07.adoc[`TextChangeReporter`] | Textual change reporter that prints banners and no‐change/filter messages. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#