[PATCH] D54381: [llvm-exegesis] InstructionBenchmarkClustering::dbScan(): use llvm::SetVector<> instead of ILLEGAL std::unordered_set<>
Phabricator via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 19 05:30:53 PST 2018
This revision was not accepted when it landed; it landed in state "Needs Revision".
This revision was automatically updated to reflect the committed changes.
Closed by commit rL347197: [llvm-exegesis] InstructionBenchmarkClustering::dbScan(): use llvm::SetVector<>… (authored by lebedevri, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D54381?vs=173522&id=174592#toc
Repository:
rL LLVM
https://reviews.llvm.org/D54381
Files:
llvm/trunk/tools/llvm-exegesis/lib/Clustering.cpp
Index: llvm/trunk/tools/llvm-exegesis/lib/Clustering.cpp
===================================================================
--- llvm/trunk/tools/llvm-exegesis/lib/Clustering.cpp
+++ llvm/trunk/tools/llvm-exegesis/lib/Clustering.cpp
@@ -8,8 +8,8 @@
//===----------------------------------------------------------------------===//
#include "Clustering.h"
+#include "llvm/ADT/SetVector.h"
#include <string>
-#include <unordered_set>
namespace llvm {
namespace exegesis {
@@ -120,11 +120,12 @@
CurrentCluster.PointIndices.push_back(P);
// Process P's neighbors.
- std::unordered_set<size_t> ToProcess(Neighbors.begin(), Neighbors.end());
+ llvm::SetVector<size_t> ToProcess;
+ ToProcess.insert(Neighbors.begin(), Neighbors.end());
while (!ToProcess.empty()) {
// Retrieve a point from the set.
const size_t Q = *ToProcess.begin();
- ToProcess.erase(Q);
+ ToProcess.erase(ToProcess.begin());
if (ClusterIdForPoint_[Q].isNoise()) {
// Change noise point to border point.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54381.174592.patch
Type: text/x-patch
Size: 1043 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181119/56eca012/attachment.bin>
More information about the llvm-commits
mailing list