[all-commits] [llvm/llvm-project] d8b61d: [llvm-exegesis] Add middle half repetition mode (#...

Aiden Grossman via All-commits all-commits at lists.llvm.org
Tue Jan 30 12:42:48 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d8b61d716899736c7f0444d1b18b8e1a536c3472
      https://github.com/llvm/llvm-project/commit/d8b61d716899736c7f0444d1b18b8e1a536c3472
  Author: Aiden Grossman <agrossman154 at yahoo.com>
  Date:   2024-01-30 (Tue, 30 Jan 2024)

  Changed paths:
    M llvm/docs/CommandGuide/llvm-exegesis.rst
    A llvm/test/tools/llvm-exegesis/X86/latency/middle-half.s
    M llvm/tools/llvm-exegesis/lib/BenchmarkResult.h
    M llvm/tools/llvm-exegesis/lib/CMakeLists.txt
    A llvm/tools/llvm-exegesis/lib/ResultAggregator.cpp
    A llvm/tools/llvm-exegesis/lib/ResultAggregator.h
    M llvm/tools/llvm-exegesis/lib/SnippetRepetitor.cpp
    M llvm/tools/llvm-exegesis/llvm-exegesis.cpp
    M llvm/unittests/tools/llvm-exegesis/CMakeLists.txt
    A llvm/unittests/tools/llvm-exegesis/ResultAggregatorTest.cpp

  Log Message:
  -----------
  [llvm-exegesis] Add middle half repetition mode (#77020)

This patch adds two new repetition modes to llvm-exegesis, particularly
loop and duplicate repetition modes of what I am terming the middle half
repetition mode. The middle half repetition mode essentially runs each
measurement twice, one with twice the number of iterations of the other.
These two measurements are then agregated by taking their difference.
This subtracts away any setup/overhead that is unrelated to the code in
the snippet, providing more accurate results.

Using this mode on a couple toy examples, I am able to get exact
(integer) throughput values on all of them in contrast to the default
duplicate/loop repetition modes which show a little bit of noise on the
snippet value.




More information about the All-commits mailing list