[PATCH] D46931: [llvm-exegesis] Add a flag to output analysis csv to a file.
Clement Courbet via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 16 02:54:00 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL332445: [llvm-exegesis] Add a flag to output analysis csv to a file. (authored by courbet, committed by ).
Repository:
rL LLVM
https://reviews.llvm.org/D46931
Files:
llvm/trunk/tools/llvm-exegesis/llvm-exegesis.cpp
Index: llvm/trunk/tools/llvm-exegesis/llvm-exegesis.cpp
===================================================================
--- llvm/trunk/tools/llvm-exegesis/llvm-exegesis.cpp
+++ llvm/trunk/tools/llvm-exegesis/llvm-exegesis.cpp
@@ -70,6 +70,10 @@
llvm::cl::desc("dbscan epsilon for analysis clustering"),
llvm::cl::init(0.1));
+static llvm::cl::opt<std::string> AnalysisClustersFile("analysis-clusters-file",
+ llvm::cl::desc(""),
+ llvm::cl::init("-"));
+
namespace exegesis {
void benchmarkMain() {
@@ -135,7 +139,6 @@
// FIXME: Check that all points have the same triple/cpu.
// FIXME: Merge points from several runs (latency and uops).
- //llvm::InitializeAllTargets();
llvm::InitializeNativeTarget();
llvm::InitializeNativeTargetAsmPrinter();
@@ -151,7 +154,13 @@
const Analysis Analyzer(*TheTarget, Clustering);
- if (auto Err = Analyzer.printClusters(llvm::outs()))
+ std::error_code ErrorCode;
+ llvm::raw_fd_ostream ClustersOS(AnalysisClustersFile, ErrorCode,
+ llvm::sys::fs::F_RW);
+ if (ErrorCode)
+ llvm::report_fatal_error("cannot open out file: " + AnalysisClustersFile);
+
+ if (auto Err = Analyzer.printClusters(ClustersOS))
llvm::report_fatal_error(std::move(Err));
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46931.147028.patch
Type: text/x-patch
Size: 1417 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180516/4d72f888/attachment.bin>
More information about the llvm-commits
mailing list