[all-commits] [llvm/llvm-project] a39aaf: Reland: "[Exegesis] Add the ability to dry-run the...

Min-Yih Hsu via All-commits all-commits at lists.llvm.org
Mon Jan 13 13:43:20 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a39aaf35d3858a5542f532e399482c2bb0259dac
      https://github.com/llvm/llvm-project/commit/a39aaf35d3858a5542f532e399482c2bb0259dac
  Author: Min-Yih Hsu <min.hsu at sifive.com>
  Date:   2025-01-13 (Mon, 13 Jan 2025)

  Changed paths:
    M llvm/docs/CommandGuide/llvm-exegesis.rst
    A llvm/test/tools/llvm-exegesis/dry-run-measurement.test
    M llvm/test/tools/llvm-exegesis/lit.local.cfg
    M llvm/tools/llvm-exegesis/lib/BenchmarkResult.h
    M llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp
    M llvm/tools/llvm-exegesis/lib/Target.cpp
    M llvm/tools/llvm-exegesis/llvm-exegesis.cpp

  Log Message:
  -----------
  Reland: "[Exegesis] Add the ability to dry-run the measurement phase (#121991)" (#122775)

This relands f8f8598fd886cddfd374fa43eb6d7d37d301b576

Follow up on #122371:
The problem here is a little subtle: when we dry-run the measurement
phase, we create a LLJIT instance without actually executing the
snippets. The key is, LLJIT has its own TargetMachine which uses triple
designated by LLVM_TARGET_ARCH (which is default to host). On a machine
that does not support Exegesis, the LLJIT would fail to create its
TargetMachine because llvm-exegesis don't even register the host's
target!

Putting this test into any of the target-specific folder won't help,
because it's about the host. And personally I don't really want to use
`exegesis-can-execute-<arch>` for generic tests like this -- it's too
strict as we don't actually need to execute the snippet.

My solution here is creating another test feature which is added only
when LLVM_TARGET_ARCH is supported by llvm-exegesis. This feature is
something in between `<arch>-registered-target` and
`exegesis-can-execute-<arch>`.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list