[PATCH] D123897: [X86] Unbreak LIT/FileCheck
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 17 07:46:31 PDT 2022
RKSimon added a comment.
Sorry for the delay - as had been mentioned its Easter break in the UK, so I'm not around much for the next few days.
The number of permutations of X86 targets / attributes / features means its one of the hardest cases to determine an optimal set/sequence of check-prefixes for multiple, diverse RUN commands. I want to be able to run the same file for all of the permutations, with the understanding that the codegen is going to keep changing (and hopefully improving) and the CHECKs will need easily regenerating, I don't want to end up trying to keep separate test files in sync apart from their RUN. For that reason alone, I think allowing unused prefixes in the X86 codegen directory makes sense until we can clean up some of the other problems we currently have with the lit + update scripts (see below).
I've hit the same levels of frustration as Roman when trying to add new tests or alter codegen; something that is a particular problem is that lit raises errors for something as benign as an unused prefix (and only reports the first error), but neither it or the update scripts barely notice when a particular RUN has no check coverage for a particular function - e.g when I've altered SSE4.1 codegen but we only had a common SSE check (because SSE2/SSSE3/SSE41 had been unused), and we get no warning that checks for SSE2/SSSE3/SSE41 RUNs all disappear - a few years ago the update script usually managed to recognise when a match for a given function+RUN failed (it only occasionally failed depending on the order of prefixes), but we have lost that.
We seem to have gotten to a stage where the update scripts have lost their ability to assist with developing test coverage - I accept that lit tests should be optimized for testing of the existing tests, and should treat unused/unknown prefixes as errors by default - but the update scripts need better warning of missing checks, automatically adding UTC_ARGS --allow-unused-prefix tags if we do have unused prefixes, warning when multiple prefixes often/always have the same matches, and a more complete output of warnings encountered, (not just the first), are all things we need to address soon.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123897/new/
https://reviews.llvm.org/D123897
More information about the llvm-commits
mailing list