[all-commits] [llvm/llvm-project] a5b563: [llvm-exegesis] `AliasingConfigurations`: pay atte...

Roman Lebedev via All-commits all-commits at lists.llvm.org
Tue Dec 20 15:02:12 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a5b56313dd8cf49a5128f93361a4bcc51b8a5485
      https://github.com/llvm/llvm-project/commit/a5b56313dd8cf49a5128f93361a4bcc51b8a5485
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2022-12-21 (Wed, 21 Dec 2022)

  Changed paths:
    M llvm/tools/llvm-exegesis/lib/MCInstrDescView.cpp
    M llvm/tools/llvm-exegesis/lib/MCInstrDescView.h
    M llvm/tools/llvm-exegesis/lib/ParallelSnippetGenerator.cpp
    M llvm/tools/llvm-exegesis/lib/SerialSnippetGenerator.cpp
    M llvm/tools/llvm-exegesis/lib/SnippetGenerator.cpp
    M llvm/tools/llvm-exegesis/lib/SnippetGenerator.h
    M llvm/tools/llvm-exegesis/lib/X86/Target.cpp
    M llvm/unittests/tools/llvm-exegesis/X86/SnippetGeneratorTest.cpp

  Log Message:
  -----------
  [llvm-exegesis] `AliasingConfigurations`: pay attention to forbidden registers

When trying to measure latency of certain opcodes, e.g.
`./bin/llvm-exegesis --opcode-name=BT32ri8 --mode=latency --repetition-mode=loop  --benchmarks-file=- --max-configs-per-opcode=65536`,
we'd pick such an aliasing instruction, and such an aliasing registers,
that would alias with forbidden registers.

And in particular with loop counter in `loop` repetition mode,
which made the measurements never finish.
This does not address all such cases, only the most obvious one.

The added test case fails without the patch.

Fixes https://github.com/llvm/llvm-project/issues/59441




More information about the All-commits mailing list