Add a new lit-cpuid tool that detects CPU features used by some of
the tests, and use it to populate available_features in lit. For now,
this means that the test for MM/XMM register read will be run only
when the host CPU support SSE instruction set. However, this is going
to make it possible to introduce additional tests relying on AVX.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
I like this approach, but as this is a novel idea, I'd like to get more opinions first. @JDevlieghere, what do you think?
lldb/lit/lit.cfg.py | ||
---|---|---|
81 ↗ | (On Diff #196467) | So if the binary is not found for any reason, this will just silently skip the relevant tests, right? Would it make sense to at least print a warning in this case? |
lldb/lit/lit.cfg.py | ||
---|---|---|
81 ↗ | (On Diff #196467) | Yes, it will skip them. I don't have an opinion on whether it's something we should warn about; but I can surely add one. |
I really like this too, it's conceptually simple, easy to use and allows us to write more tests in lit. Thanks for doing this Michał.
lldb/lit/lit.cfg.py | ||
---|---|---|
81 ↗ | (On Diff #196467) | I agree it would be good to print a warning. We're the ones building the tool so there's really no good reason for it not to be found. |
Added warnings for missing or failed lit-cpuid. Not that there any failure conditions in the program right now ;-).