Skip to content

Commit

Permalink
GP-3527 Auto VT dupe function match speedup
Browse files Browse the repository at this point in the history
  • Loading branch information
ghidra007 committed Jun 7, 2023
1 parent 68dd1c5 commit 6262289
Showing 1 changed file with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -464,13 +464,27 @@ private boolean applyDuplicateFunctionMatches(Collection<VTMatch> matches, TaskM
continue;
}

// if already matched or blocked skip it
if (match.getAssociation().getStatus() != VTAssociationStatus.AVAILABLE) {
continue;
}

// Get a set of related matches from the set of all matches. These all have the same
// instructions as each other but not necessarily the same operands.
Set<VTMatch> relatedMatches = getRelatedMatches(match, matches, monitor);

// remove related matches from the set of matches to process next time
// remove related matches from the copy of set of matches which gets checked
// and skipped if not in the set
removeMatches(copyOfMatches, relatedMatches);

if (relatedMatches.size() > 20) {
Msg.debug(this, "Too many related matches to process this match set " +
match.getSourceAddress());
continue;
}



// remove any matches that have identical source functions - if more than one
// with exactly the same instructions and operands then cannot determine a unique match
Set<Address> sourceAddresses = getSourceAddressesFromMatches(relatedMatches, monitor);
Expand Down

0 comments on commit 6262289

Please sign in to comment.