[llvm] 08d145e - [IRSim][NFC] Removing dead variables from IRSimilarityIdentifier.cpp

Andrew Litteken via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 24 09:44:16 PDT 2020


Author: Andrew Litteken
Date: 2020-09-24T11:43:33-05:00
New Revision: 08d145e6d7a9b3085d433d05abac5c8a4392e09a

URL: https://github.com/llvm/llvm-project/commit/08d145e6d7a9b3085d433d05abac5c8a4392e09a
DIFF: https://github.com/llvm/llvm-project/commit/08d145e6d7a9b3085d433d05abac5c8a4392e09a.diff

LOG: [IRSim][NFC] Removing dead variables from IRSimilarityIdentifier.cpp

As informed by danielkiss.

Follow up to Differential Revision: https://reviews.llvm.org/D86972

Added: 
    

Modified: 
    llvm/lib/Analysis/IRSimilarityIdentifier.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Analysis/IRSimilarityIdentifier.cpp b/llvm/lib/Analysis/IRSimilarityIdentifier.cpp
index c482fd52bad0..579074f5de08 100644
--- a/llvm/lib/Analysis/IRSimilarityIdentifier.cpp
+++ b/llvm/lib/Analysis/IRSimilarityIdentifier.cpp
@@ -466,8 +466,6 @@ static void createCandidatesFromSuffixTree(
     std::vector<IRSimilarityCandidate> &CandsForRepSubstring) {
 
   unsigned StringLen = RS.Length;
-  unsigned NumFound = 0;
-  unsigned PreviousIdx = 0;
 
   // Create an IRSimilarityCandidate for instance of this subsequence \p RS.
   for (const unsigned &StartIdx : RS.StartIndices) {
@@ -488,9 +486,6 @@ static void createCandidatesFromSuffixTree(
     if (ContainsIllegal)
       continue;
 
-    PreviousIdx = EndIdx;
-    NumFound++;
-
     // We are getting iterators to the instructions in this region of code
     // by advancing the start and end indices from the start of the
     // InstrList.


        


More information about the llvm-commits mailing list