[IRSim] Adding structural comparison to IRSimilarityCandidate.
authorAndrew Litteken <andrew.litteken@gmail.com>
Wed, 23 Sep 2020 16:04:39 +0000 (11:04 -0500)
committerAndrew Litteken <andrew.litteken@gmail.com>
Thu, 24 Sep 2020 03:31:12 +0000 (22:31 -0500)
commitb27db2bb68163fa5bcb4a8f631a305eb5adb44e5
tree235d5bdb537cbe459fe334709db385ea13541105
parent9c70281497730a7dc7df43435bf570bef1108454
[IRSim] Adding structural comparison to IRSimilarityCandidate.

Just because sequences of instructions are similar to one another,
doesn't mean they are doing the same thing.

This introduces a structural check for the IRSimilarityCandidate that
compares two IRSimilarityCandidates against one another, and in each
instruction creates a mapping between the operands and results, or
checks that the existing mapping is valid.  If this check passes, it
means we have structurally similar IRSimilarityCandidates.

Tests for whether the candidates are found in
unittests/Analysis/IRSimilarityIdentifierTest.cpp.
llvm/include/llvm/Analysis/IRSimilarityIdentifier.h
llvm/lib/Analysis/IRSimilarityIdentifier.cpp
llvm/unittests/Analysis/IRSimilarityIdentifierTest.cpp