From 64720f57bea6a6bf033feef4a5751ab9c0c3b401 Mon Sep 17 00:00:00 2001 From: Andrew Litteken Date: Fri, 11 Jun 2021 15:41:36 -0500 Subject: [PATCH] [IRSim] Don't copy the Mapper for createCandidatesFromSuffixTree Every invocation this was copying the Mapper for no reason. Take a const ref instead. Author: lanza Reviewers: AndrewLitteken, plofti, paquette, Differential Review: https://reviews.llvm.org/D92532 --- llvm/lib/Analysis/IRSimilarityIdentifier.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Analysis/IRSimilarityIdentifier.cpp b/llvm/lib/Analysis/IRSimilarityIdentifier.cpp index d59383958aab..dd0f62521aa9 100644 --- a/llvm/lib/Analysis/IRSimilarityIdentifier.cpp +++ b/llvm/lib/Analysis/IRSimilarityIdentifier.cpp @@ -702,7 +702,7 @@ void IRSimilarityIdentifier::populateMapper( /// \param [out] CandsForRepSubstring - The vector to store the generated /// IRSimilarityCandidates. static void createCandidatesFromSuffixTree( - IRInstructionMapper Mapper, std::vector &InstrList, + const IRInstructionMapper& Mapper, std::vector &InstrList, std::vector &IntegerMapping, SuffixTree::RepeatedSubstring &RS, std::vector &CandsForRepSubstring) {