This is an archive of the discontinued LLVM Phabricator instance.

[llvm-exegesis] Improve test flexibility by using available_features

Authored by kpdev42 on Mar 17 2023, 8:17 AM.



Currently, all llvm-exegesis regression tests are target-specific and
they are organized so that the entire subdirectories of
llvm/test/tools/llvm-exegesis are enabled or disabled as a whole.

After the commit e0ad2af691 ("Skip codegen" dry-run mode), at least two
kinds of tests are possible:

  1. ensure that a snippet can be *generated* for the particular opcode
  2. tests involving actual snippet execution inside the llvm-exegesis process

Thus, for the particular target subdirectory, some tests should run only
on the particular host architecture and other tests only need the target

This commit defines a bunch of exegesis-specific features that can be
referenced in REQUIRES, UNSUPPORTED, etc. on a test-by-test basis.


Huawei RRI

Diff Detail

Event Timeline

kpdev42 created this revision.Mar 17 2023, 8:17 AM
kpdev42 requested review of this revision.Mar 17 2023, 8:17 AM
kpdev42 edited the summary of this revision. (Show Details)
courbet accepted this revision.Mar 27 2023, 12:43 AM

This is great, thanks for the patch.

This revision is now accepted and ready to land.Mar 27 2023, 12:43 AM
stuij added a subscriber: stuij.Mar 27 2023, 7:44 AM

This was breaking for us because can_use_perf_counters() in lit.local.cfg couldn't find llvm-exegesis in the first place.

I made a fix: