[IRSim] Adding IRSimilarityCandidate that contains a region of IRInstructionData.
authorAndrew Litteken <andrew_litteken@apple.com>
Tue, 15 Sep 2020 22:30:31 +0000 (17:30 -0500)
committerAndrew Litteken <andrew.litteken@gmail.com>
Tue, 22 Sep 2020 23:42:31 +0000 (18:42 -0500)
commit4944bb190fed8861d4d043eaf45e3c1e12aa2dc5
treead6dd5e2de32af932826091c33178d09387dbbc9
parentaf429cd89bf83bbbef295ded85e66f03776ec015
[IRSim] Adding IRSimilarityCandidate that contains a region of IRInstructionData.

The IRSimilarityCandidate is a container to hold a region of
IRInstructions and offer interfaces for the starting instruction, ending
instruction, parent function, length.  It also assigns a global value
number for each unique instance of a value in the region.

It also contains an interface to compare two IRSimilarity as to whether
they have the same sequence of similar instructions.

Tests for whether the instructions are similar are found in
unittests/Analysis/IRSimilarityIdentifierTest.cpp.

Differential Revision: https://reviews.llvm.org/D86970
llvm/include/llvm/Analysis/IRSimilarityIdentifier.h
llvm/lib/Analysis/IRSimilarityIdentifier.cpp
llvm/unittests/Analysis/IRSimilarityIdentifierTest.cpp