llvm::FunctionComparator

FunctionComparator - Compares two functions to determine whether or not.

Synopsis

Declared in <llvm/Transforms/Utils/FunctionComparator.h>

class FunctionComparator;

Description

they will generate machine code with the same behaviour. DataLayout is used if available. The comparator always fails conservatively (erring on the side of claiming that two functions are different).

Member Functions

NameDescription
FunctionComparator [constructor]Construct a comparator for two functions using shared global numbering.
compare Test whether the two functions have equivalent behaviour.

Protected Member Functions

NameDescription
beginCompare Start the comparison.
cmpAPFloats Compare two arbitrary-precision floating-point values for ordering.
cmpAPInts Compare two arbitrary-precision integers for ordering.
cmpAligns Compare two alignments for ordering.
cmpBasicBlocks Test whether two basic blocks have equivalent behaviour.
cmpConstantRanges Compare two constant ranges for ordering.
cmpConstants Constants comparison. Its analog to lexicographical comparison between hypothetical numbers of next format: <bitcastability-trait><raw-bit-contents>
cmpGlobalValues Compares two global values by number. Uses the GlobalNumbersState to identify the same gobals across function calls.
cmpMem Compare two memory regions as string contents for ordering.
cmpNumbers Compare two unsigned integers for ordering.
cmpOperations Compare two Instructions for equivalence, similar to Instruction::isSameOperationAs.
cmpTypes cmpType - compares two types, defines total ordering among the types set.
cmpValues Compare two values by serial numbers or constant/InlineAsm rules.
cmpValuesAllowingSelfRef Compare values, treating self-refs to the compared functions as equal.
compareSignature Compares the signature and other general attributes of the two functions.

Protected Data Members

NameDescription
FnL Left-hand function undergoing comparison.
FnR Right-hand function undergoing comparison.