summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-exegesis/llvm-exegesis.cpp
diff options
context:
space:
mode:
authorGuillaume Chatelet <gchatelet@google.com>2018-06-07 14:00:29 +0000
committerGuillaume Chatelet <gchatelet@google.com>2018-06-07 14:00:29 +0000
commitb4f1582ac5a4cb9084f246baa7ad7958a94eb5b3 (patch)
tree64b53488fb17884b5a1e812321b1f3a3c0b8ecdd /llvm/tools/llvm-exegesis/llvm-exegesis.cpp
parentcb0f043cece104cac1702ce1e58e701c78970296 (diff)
downloadbcm5719-llvm-b4f1582ac5a4cb9084f246baa7ad7958a94eb5b3.tar.gz
bcm5719-llvm-b4f1582ac5a4cb9084f246baa7ad7958a94eb5b3.zip
[llvm-exegesis] Make BenchmarkRunner handle multiple configurations.
Summary: BenchmarkRunner subclasses can now create many configurations - although this patch still generates one. Reviewers: courbet Subscribers: tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D47877 llvm-svn: 334197
Diffstat (limited to 'llvm/tools/llvm-exegesis/llvm-exegesis.cpp')
-rw-r--r--llvm/tools/llvm-exegesis/llvm-exegesis.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/tools/llvm-exegesis/llvm-exegesis.cpp b/llvm/tools/llvm-exegesis/llvm-exegesis.cpp
index e59843b4aca..47f2dd9bebd 100644
--- a/llvm/tools/llvm-exegesis/llvm-exegesis.cpp
+++ b/llvm/tools/llvm-exegesis/llvm-exegesis.cpp
@@ -144,9 +144,12 @@ void benchmarkMain() {
if (BenchmarkFile.empty())
BenchmarkFile = "-";
- ExitOnErr(
- Runner->run(GetOpcodeOrDie(State.getInstrInfo()), Filter, NumRepetitions)
- .writeYaml(getBenchmarkResultContext(State), BenchmarkFile));
+ const BenchmarkResultContext Context = getBenchmarkResultContext(State);
+ std::vector<InstructionBenchmark> Results = ExitOnErr(Runner->run(
+ GetOpcodeOrDie(State.getInstrInfo()), Filter, NumRepetitions));
+ for (InstructionBenchmark &Result : Results)
+ Result.writeYaml(Context, BenchmarkFile);
+
exegesis::pfm::pfmTerminate();
}
OpenPOWER on IntegriCloud