[llvm] 498704d - [NFC][exegesis] By default, don't dump objects to disk
Roman Lebedev via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 28 05:57:38 PST 2022
Author: Roman Lebedev
Date: 2022-12-28T16:56:54+03:00
New Revision: 498704d511d3e0ac960498c4590ae10a37db3f03
URL: https://github.com/llvm/llvm-project/commit/498704d511d3e0ac960498c4590ae10a37db3f03
DIFF: https://github.com/llvm/llvm-project/commit/498704d511d3e0ac960498c4590ae10a37db3f03.diff
LOG: [NFC][exegesis] By default, don't dump objects to disk
It's a strictly-developer feature, which is useless most of the time.
Fixes https://github.com/llvm/llvm-project/issues/59082
Reviewed By: RKSimon, gchatelet
Differential Revision: https://reviews.llvm.org/D140700
Added:
llvm/test/tools/llvm-exegesis/X86/latency/dump-object-to-disk.s
Modified:
llvm/tools/llvm-exegesis/llvm-exegesis.cpp
Removed:
################################################################################
diff --git a/llvm/test/tools/llvm-exegesis/X86/latency/dump-object-to-disk.s b/llvm/test/tools/llvm-exegesis/X86/latency/dump-object-to-disk.s
new file mode 100644
index 000000000000..607c33957132
--- /dev/null
+++ b/llvm/test/tools/llvm-exegesis/X86/latency/dump-object-to-disk.s
@@ -0,0 +1,9 @@
+# RUN: llvm-exegesis -mtriple=x86_64-unknown-unknown -mcpu=x86-64 -mode=latency --skip-measurements -opcode-name=ADDPSrr -repetition-mode=duplicate -dump-object-to-disk=1 2>&1 | FileCheck %s --check-prefix=CHECK-ON
+# RUN: llvm-exegesis -mtriple=x86_64-unknown-unknown -mcpu=x86-64 -mode=latency --skip-measurements -opcode-name=ADDPSrr -repetition-mode=loop -dump-object-to-disk=1 2>&1 | FileCheck %s --check-prefix=CHECK-ON
+# RUN: llvm-exegesis -mtriple=x86_64-unknown-unknown -mcpu=x86-64 -mode=latency --skip-measurements -opcode-name=ADDPSrr -repetition-mode=duplicate -dump-object-to-disk=0 2>&1 | FileCheck %s --check-prefix=CHECK-OFF
+# RUN: llvm-exegesis -mtriple=x86_64-unknown-unknown -mcpu=x86-64 -mode=latency --skip-measurements -opcode-name=ADDPSrr -repetition-mode=loop -dump-object-to-disk=0 2>&1 | FileCheck %s --check-prefix=CHECK-OFF
+# RUN: llvm-exegesis -mtriple=x86_64-unknown-unknown -mcpu=x86-64 -mode=latency --skip-measurements -opcode-name=ADDPSrr -repetition-mode=duplicate 2>&1 | FileCheck %s --check-prefix=CHECK-OFF
+# RUN: llvm-exegesis -mtriple=x86_64-unknown-unknown -mcpu=x86-64 -mode=latency --skip-measurements -opcode-name=ADDPSrr -repetition-mode=loop 2>&1 | FileCheck %s --check-prefix=CHECK-OFF
+
+CHECK-ON: Check generated assembly with
+CHECK-OFF-NOT: Check generated assembly with
diff --git a/llvm/tools/llvm-exegesis/llvm-exegesis.cpp b/llvm/tools/llvm-exegesis/llvm-exegesis.cpp
index 646c46cf4426..6588504529c0 100644
--- a/llvm/tools/llvm-exegesis/llvm-exegesis.cpp
+++ b/llvm/tools/llvm-exegesis/llvm-exegesis.cpp
@@ -205,11 +205,11 @@ static cl::opt<std::string>
cl::desc("Target a specific cpu type (-mcpu=help for details)"),
cl::value_desc("cpu-name"), cl::cat(Options), cl::init("native"));
-static cl::opt<bool>
- DumpObjectToDisk("dump-object-to-disk",
- cl::desc("dumps the generated benchmark object to disk "
- "and prints a message to access it"),
- cl::cat(BenchmarkOptions), cl::init(true));
+static cl::opt<bool> DumpObjectToDisk(
+ "dump-object-to-disk",
+ cl::desc("dumps the generated benchmark object to disk "
+ "and prints a message to access it (default = false)"),
+ cl::cat(BenchmarkOptions), cl::init(false));
static ExitOnError ExitOnErr("llvm-exegesis error: ");
More information about the llvm-commits
mailing list