[llvm] r248872 - InstrProf: Don't call std::unique twice here

Justin Bogner via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 29 19:02:09 PDT 2015


Author: bogner
Date: Tue Sep 29 21:02:08 2015
New Revision: 248872

URL: http://llvm.org/viewvc/llvm-project?rev=248872&view=rev
Log:
InstrProf: Don't call std::unique twice here

Modified:
    llvm/trunk/lib/ProfileData/InstrProfReader.cpp

Modified: llvm/trunk/lib/ProfileData/InstrProfReader.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ProfileData/InstrProfReader.cpp?rev=248872&r1=248871&r2=248872&view=diff
==============================================================================
--- llvm/trunk/lib/ProfileData/InstrProfReader.cpp (original)
+++ llvm/trunk/lib/ProfileData/InstrProfReader.cpp Tue Sep 29 21:02:08 2015
@@ -452,7 +452,6 @@ std::error_code IndexedInstrProfReader::
     HashKeys.push_back(std::make_pair(ComputeHash(HashType, Key), KeyTableRef));
   }
   std::sort(HashKeys.begin(), HashKeys.end(), less_first());
-  std::unique(HashKeys.begin(), HashKeys.end(), less_first());
   HashKeys.erase(std::unique(HashKeys.begin(), HashKeys.end()), HashKeys.end());
   // Set the hash key map for the InstrLookupTrait
   Index->getInfoObj().setHashKeys(std::move(HashKeys));




More information about the llvm-commits mailing list