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.
I think you can avoid the expensive vector copy by writing this as:
for (Value *Arg : ID->OperVals) {