diff options
Diffstat (limited to 'llvm/tools/llvm-exegesis/lib/Analysis.cpp')
-rw-r--r-- | llvm/tools/llvm-exegesis/lib/Analysis.cpp | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/llvm/tools/llvm-exegesis/lib/Analysis.cpp b/llvm/tools/llvm-exegesis/lib/Analysis.cpp deleted file mode 100644 index c8b2cb8c009..00000000000 --- a/llvm/tools/llvm-exegesis/lib/Analysis.cpp +++ /dev/null @@ -1,48 +0,0 @@ - -#include "Analysis.h" -#include "llvm/Support/Format.h" - -namespace exegesis { - -namespace { - -// Prints a row representing an instruction, along with scheduling info and -// point coordinates (measurements). -void renderInstructionRow(const InstructionBenchmark &Point, - const size_t NameLen, llvm::raw_ostream &OS) { - OS << llvm::format("%*s", NameLen, Point.AsmTmpl.Name.c_str()); - for (const auto &Measurement : Point.Measurements) { - OS << llvm::format(" %*.2f", Measurement.Key.size(), Measurement.Value); - } - OS << "\n"; -} - -void printCluster(const std::vector<InstructionBenchmark> &Points, - const llvm::MCSubtargetInfo &STI, - const size_t ClusterId, - const InstructionBenchmarkClustering::Cluster &Cluster, - llvm::raw_ostream &OS) { - // TODO: - // GetSchedClass(Points[PointIdB]); }); - - // Print all points. - for (const auto &PointId : Cluster.PointIndices) { - renderInstructionRow(Points[PointId], NameLen, OS); - } -} - -} // namespace - -llvm::Error -printAnalysisClusters(const InstructionBenchmarkClustering &Clustering, - const llvm::MCSubtargetInfo &STI, llvm::raw_ostream &OS) { - OS << "cluster_id,key,"; - for (size_t I = 0, E = Clustering.getValidClusters().size(); I < E; ++I) { - printCluster(Clustering.getPoints(), STI, I, Clustering.getValidClusters()[I], OS); - OS << "\n\n"; - } - - return llvm::Error::success(); -} - -} // namespace exegesis |