llvm::IRComparer

Compares two IR snapshots and reports per-function differences.

Synopsis

Declared in <llvm/Passes/StandardInstrumentations.h>

template<typename T>
class IRComparer;

Description

The class is created with the 2 IRs to compare and then compare is called. The static function analyzeIR is used to build up the IR representation.

Member Functions

NameDescription
IRComparer [constructor]Construct a comparer for Before and After IR snapshots.
compare Compare the two IRs, invoking CompareFunc for each function pair.

Static Member Functions

NameDescription
analyzeIR Analyze IR and build the IR representation in Data.

Protected Static Member Functions

NameDescription
generateFunctionData Generate the data for F into Data.

Protected Data Members

NameDescription
After IR snapshot taken after the pass.
Before IR snapshot taken before the pass.