summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-exegesis/llvm-exegesis.cpp
diff options
context:
space:
mode:
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