-
Notifications
You must be signed in to change notification settings - Fork 14.9k
[LLVM] Specialize test suites for TableGen
and FileCheck
to use smaller set of dependencies
#155929
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
I'm confused by the title, shouldn't it be instead "Add support to define lit test suites with an include/exclude list of folders" or something like this? I don't see the "dependency" part here. |
I believe the |
OK but it still does not seem to be "Add support to define lit test suites with ..." but "Add LLVM lit test suites with ..."? |
Right, maybe this works: Specialize LLVM lit test suites for TableGen and FileCheck with a smaller set of dependencies? |
TableGen
and FileCheck
with a smaller set of dependencies
e4a3afd
to
9b0194a
Compare
e283a43
to
03c8d0d
Compare
Or because the dependencies were found in the system. I've once ran into this with These warnings should not be ignored and they can be confusing. Instead, we should specialize the list of needed tools per subdirectory (is it possible to add something to lit.local.cfg to achieve that?). Not a blocker to me, but others may find the warnings confusing. |
Right, so assuming the list of dependencies is correct, we get a warning for the unused dependencies and its benign. If the list of dependencies itself is missing a dependency, then you're right that this will end up using the command without substitution (from somewhere else or even from the same build/bin directory, just that it hasn't been rebuilt). This does not address that (or make it worse as well). Again, assuming the trimmed list of dependencies is kept correct |
TableGen
and FileCheck
with a smaller set of dependenciesTableGen
and FileCheck
to use smaller set of dependencies
This is a very strong assumption? The list may be incomplete from the start or become outdated (unlikely for TableGen/FileCheck, but for other subdirectories -- not impossible).
I imagine one big list makes it less likely that there is something missing from it. |
I agree that one giant list makes it less likely than several smaller lists and it's more likely that one of the smaller lists can become outdated. This was discussed on the discourse thread and was agreed as a practical but imperfect solution. |
I understand the utility of what you're trying to do here, but I worry that if we extrapolate this pattern out across the test subdirectories we're going to create an unmanageable mess. Every subdirectory under the test suite gets its own target, and if each target gets configured for its own dependency subset manually we're creating a real mess to maintain. |
For codegen and the middle-end tests like Analysis and Transforms, this (relatively short) list of dependencies doesn't change really frequently, so personally I'm not super worry about managing lists in those places. That being said, some places like MC might have a more diversified dependencies. |
Right, it's not a perfect solution, but as @mshockwave said limiting it to top-level directories only (I can add a comment to say so) can both avoid the issue @llvm-beanz is worried about and also such specialization is likely only needed in that scenarios for coarse level separation of dependencies. So it's a combination of having the ability and some discipline on our side to limit this to top level directories. |
@llvm-beanz will restricting specialization to top-level directories only address your concerns? |
Change
add_lit_testsuites
to accept either a set of include or a set of exclude directories and use that to specializecheck-llvm-tablegen
andcheck-llvm-filecheck
targets to use a trimmed down set of dependencies. Thecheck-llvm-filecheck
trimming is just for demonstration purpose to show how > 1 testsuites can have smaller set of dependencies than the defaultLLVM_TEST_DEPENDS
.Note that building
check-llvm-filecheck
for example when not all LLVM tools have been built results in warnings like:but the lit tests run fine since all the dependencies specified do get rebuilt.