summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/tools/llvm-exegesis/lib/Clustering.cpp5
-rw-r--r--llvm/tools/llvm-exegesis/lib/Clustering.h2
2 files changed, 4 insertions, 3 deletions
diff --git a/llvm/tools/llvm-exegesis/lib/Clustering.cpp b/llvm/tools/llvm-exegesis/lib/Clustering.cpp
index f61bfbc3160..9ff4c029ab3 100644
--- a/llvm/tools/llvm-exegesis/lib/Clustering.cpp
+++ b/llvm/tools/llvm-exegesis/lib/Clustering.cpp
@@ -9,6 +9,7 @@
#include "Clustering.h"
#include "llvm/ADT/SetVector.h"
+#include "llvm/ADT/SmallVector.h"
#include <string>
namespace llvm {
@@ -32,9 +33,9 @@ namespace exegesis {
// Finds the points at distance less than sqrt(EpsilonSquared) of Q (not
// including Q).
-std::vector<size_t>
+llvm::SmallVector<size_t, 0>
InstructionBenchmarkClustering::rangeQuery(const size_t Q) const {
- std::vector<size_t> Neighbors;
+ llvm::SmallVector<size_t, 0> Neighbors;
const auto &QMeasurements = Points_[Q].Measurements;
for (size_t P = 0, NumPoints = Points_.size(); P < NumPoints; ++P) {
if (P == Q)
diff --git a/llvm/tools/llvm-exegesis/lib/Clustering.h b/llvm/tools/llvm-exegesis/lib/Clustering.h
index 9dc0adffb1e..0d8a463371a 100644
--- a/llvm/tools/llvm-exegesis/lib/Clustering.h
+++ b/llvm/tools/llvm-exegesis/lib/Clustering.h
@@ -97,7 +97,7 @@ private:
const std::vector<InstructionBenchmark> &Points, double EpsilonSquared);
llvm::Error validateAndSetup();
void dbScan(size_t MinPts);
- std::vector<size_t> rangeQuery(size_t Q) const;
+ llvm::SmallVector<size_t, 0> rangeQuery(size_t Q) const;
const std::vector<InstructionBenchmark> &Points_;
const double EpsilonSquared_;
OpenPOWER on IntegriCloud