[llvm] [Docs][llvm-exegesis] Add documentation on recently added options (PR #75408)

Aiden Grossman via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 14 01:23:35 PST 2023


https://github.com/boomanaiden154 updated https://github.com/llvm/llvm-project/pull/75408

>From e60c34d15942d3d14a8d7f6d01e6bc51b2caca2e Mon Sep 17 00:00:00 2001
From: Aiden Grossman <agrossman154 at yahoo.com>
Date: Wed, 13 Dec 2023 16:06:14 -0800
Subject: [PATCH 1/2] [Docs][llvm-exegesis] Add documentation on recently added
 options

This patch adds information on the new LLVM-EXEGESIS-SNIPPET-ADDRESS
annotation and on the --benchmark-repeat-count flag.
---
 llvm/docs/CommandGuide/llvm-exegesis.rst | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/llvm/docs/CommandGuide/llvm-exegesis.rst b/llvm/docs/CommandGuide/llvm-exegesis.rst
index 874bae82a1029a..a1c631e9687ba7 100644
--- a/llvm/docs/CommandGuide/llvm-exegesis.rst
+++ b/llvm/docs/CommandGuide/llvm-exegesis.rst
@@ -81,6 +81,12 @@ properly.
   definition should start at. Note that a single memory definition can be
   mapped multiple times. Using this annotation requires the subprocess
   execution mode.
+* `LLVM-EXEGESIS-SNIPPET-ADDRESS <address>` - This annotation allows for
+  setting the address where the beginning of the snippet to be executed will
+  be mapped in at. The address is given in hexadecimal. Note that the snippet
+  also includes setup code, so the instruction exactly at the specified
+  address will not be the first instruction in the snippet. Using this
+  annotation requires the subprocess execution mode.
 
 EXAMPLE 1: benchmarking instructions
 ------------------------------------
@@ -425,6 +431,12 @@ OPTIONS
   features such as memory annotations but is currently restricted to X86-64
   on Linux.
 
+.. option:: --benchmark-repeat-count=<repeat-count>
+
+  This option enables specifying the number of times to repeat the benchmark
+  when performing latency benchmarks. By default, llvm-exegesis will repeat
+  a latency measurement 30 times and then aggregate the results.
+
 EXIT STATUS
 -----------
 

>From 11054f8f94a74b58da7887cbbd2ea0bc813d4ce9 Mon Sep 17 00:00:00 2001
From: Aiden Grossman <agrossman154 at yahoo.com>
Date: Thu, 14 Dec 2023 01:23:24 -0800
Subject: [PATCH 2/2] Address reviewer feedback

---
 llvm/docs/CommandGuide/llvm-exegesis.rst | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/llvm/docs/CommandGuide/llvm-exegesis.rst b/llvm/docs/CommandGuide/llvm-exegesis.rst
index a1c631e9687ba7..bc37d52d147668 100644
--- a/llvm/docs/CommandGuide/llvm-exegesis.rst
+++ b/llvm/docs/CommandGuide/llvm-exegesis.rst
@@ -86,7 +86,9 @@ properly.
   be mapped in at. The address is given in hexadecimal. Note that the snippet
   also includes setup code, so the instruction exactly at the specified
   address will not be the first instruction in the snippet. Using this
-  annotation requires the subprocess execution mode.
+  annotation requires the subprocess execution mode. This is useful in
+  cases where the memory accessed by the snippet depends on the location
+  of the snippet, like RIP-relative addressing.
 
 EXAMPLE 1: benchmarking instructions
 ------------------------------------
@@ -433,9 +435,9 @@ OPTIONS
 
 .. option:: --benchmark-repeat-count=<repeat-count>
 
-  This option enables specifying the number of times to repeat the benchmark
-  when performing latency benchmarks. By default, llvm-exegesis will repeat
-  a latency measurement 30 times and then aggregate the results.
+  This option enables specifying the number of times to repeat the measurement
+  when performing latency measurements. By default, llvm-exegesis will repeat
+  a latency measurement enough times to balance run-time and noise reduction.
 
 EXIT STATUS
 -----------



More information about the llvm-commits mailing list