[lit] Fix setup of sanitizer environmentNot all options were propageted into tests.Reviewed By: ychenDifferential Revision: https://reviews.llvm.org/D122869
Use lit_config.substitute instead of foo % lit_config.params everywhereThis mechanically applies the same changes from D121427 everywhere.Differential Revision: https://reviews.llvm.org/D121746
[CMake] Rename TARGET_TRIPLE to LLVM_TARGET_TRIPLEThis clarifies that this is an LLVM specific variable and avoidspotential conflicts with other projects.Differential Revision: https://reviews.l
[CMake] Rename TARGET_TRIPLE to LLVM_TARGET_TRIPLEThis clarifies that this is an LLVM specific variable and avoidspotential conflicts with other projects.Differential Revision: https://reviews.llvm.org/D119918
show more ...
Generalize the pass registration mechanism used by Polly to any third-party toolThere's quite a lot of references to Polly in the LLVM CMake codebase. Howeverthe registration pattern used by Polly
Generalize the pass registration mechanism used by Polly to any third-party toolThere's quite a lot of references to Polly in the LLVM CMake codebase. Howeverthe registration pattern used by Polly could be useful to other externalprojects: thanks to that mechanism it would be possible to develop LLVMextension without touching the LLVM code base.This patch has two effects:1. Remove all code specific to Polly in the llvm/clang codebase, replaicing it with a generic mechanism2. Provide a generic mechanism to register compiler extensions.A compiler extension is similar to a pass plugin, with the notable differencethat the compiler extension can be configured to be built dynamically (likeplugins) or statically (like regular passes).As a result, people willing to add extra passes to clang/opt can do it using aseparate code repo, but still have their pass be linked in clang/opt as built-inpasses.Differential Revision: https://reviews.llvm.org/D61446
Assume the shared library path variable is LD_LIBRARY_PATH on systemsexcept Darwin and Windows. This prevents inserting an environmentvariable with an empty name (which is illegal and leads to a P
Assume the shared library path variable is LD_LIBRARY_PATH on systemsexcept Darwin and Windows. This prevents inserting an environmentvariable with an empty name (which is illegal and leads to a Pythonexception) on any of the BSDs.llvm-svn: 323041
Resubmit "[lit] Force site configs to run before source-tree configs"This is a resubmission of r313270. It broke standalone builds ofcompiler-rt because we were not correctly generating the llvm-
Resubmit "[lit] Force site configs to run before source-tree configs"This is a resubmission of r313270. It broke standalone builds ofcompiler-rt because we were not correctly generating the llvm-litscript in the standalone build directory.The fixes incorporated here attempt to find llvm/utils/llvm-litfrom the source tree returned by llvm-config. If present, itwill generate llvm-lit into the output directory. Regardless,the user can specify -DLLVM_EXTERNAL_LIT to point to a specificlit.py on their file system. This supports the use case ofsomeone installing lit via a package manager. If it cannot finda source tree, and -DLLVM_EXTERNAL_LIT is either unspecified orinvalid, then we print a warning that tests will not be ableto run.Differential Revision: https://reviews.llvm.org/D37756llvm-svn: 313407
Revert "[lit] Force site configs to run before source-tree configs"This patch is still breaking several multi-stage compiler-rt bots.I already know what the fix is, but I want to get the bots gree
Revert "[lit] Force site configs to run before source-tree configs"This patch is still breaking several multi-stage compiler-rt bots.I already know what the fix is, but I want to get the bots greenfor now and then try re-applying in the morning.llvm-svn: 313335
[lit] Force site configs to be run before source-tree configsThis patch simplifies LLVM's lit infrastructure by enforcing an orderingthat a site config is always run before a source-tree config.
[lit] Force site configs to be run before source-tree configsThis patch simplifies LLVM's lit infrastructure by enforcing an orderingthat a site config is always run before a source-tree config.A significant amount of the complexity from lit config files arises fromthe fact that inside of a source-tree config file, we don't yet know ifthe site config has been run. However it is *always* required to runa site config first, because it passes various variables down throughCMake that the main config depends on. As a result, every configfile has to do a bunch of magic to try to reverse-engineer the locationof the site config file if they detect (heuristically) that the siteconfig file has not yet been run.This patch solves the problem by emitting a mapping from source treeconfig file to binary tree site config file in llvm-lit.py. Then, duringdiscovery when we find a config file, we check to see if we have atarget mapping for it, and if so we use that instead.This mechanism is generic enough that it does not affect external usersof lit. They will just not have a config mapping defined, and everythingwill work as normal.On the other hand, for us it allows us to make many simplifications:* We are guaranteed that a site config will be executed first* Inside of a main config, we no longer have to assume that attributes might not be present and use getattr everywhere.* We no longer have to pass parameters such as --param llvm_site_config=<path> on the command line.* It is future-proof, meaning you don't have to edit llvm-lit.in to add support for new projects.* All of the duplicated logic of trying various fallback mechanisms of finding a site config from the main config are now gone.One potentially noteworthy thing that was required to implement thischange is that whereas the ninja check targets previously used the firstmethod to spawn lit, they now use the second. In particular, you can nolonger run lit.py against the source tree while specifying the various`foo_site_config=<path>` parameters. Instead, you need to runllvm-lit.py.Differential Revision: https://reviews.llvm.org/D37756llvm-svn: 313270
[Polly][CMake] Skip unit-tests in lit if gtest is not availableSummary:There is a bug in the current lit configurations for the unittests. If gtest is not available, the site-config for the unit t
[Polly][CMake] Skip unit-tests in lit if gtest is not availableSummary:There is a bug in the current lit configurations for the unittests. If gtest is not available, the site-config for the unit tests won't be generated. Because lit recurses through the test directory, the lit configuration for the unit tests will be discovered nevertheless, leading to a fatal error in lit.This patch semi-gracefully skips the unittests if gtest is not available. As a result, running lit now prints this: `warning: test suite 'Polly-Unit' contained no test`.If people think that this is too annoying, the alternative would be to pick apart the test directory, so that the lit testsuite discovery will always only find one configuration. In fact, both of these things could be combined. While it's certainly nice that running a single lit command runs all the tests, I suppose people use the `check-polly` make target over lit most of the time, so the difference might not be noticed.Reviewers: Meinersbur, grosserReviewed By: grosserSubscribers: mgorny, bollu, pollydev, llvm-commitsTags: #pollyDifferential Revision: https://reviews.llvm.org/D34053llvm-svn: 307651
Introduce unittests.Add the infrastructure for unittests to Polly and two simple tests forconversion between isl_val and APInt. In addition, a build targetcheck-polly-unittests is added to run on
Introduce unittests.Add the infrastructure for unittests to Polly and two simple tests forconversion between isl_val and APInt. In addition, a build targetcheck-polly-unittests is added to run only the unittests but not the regressiontests.Clang's unittest mechanism served as as a blueprint which then was adapted toPolly.Differential Revision: https://reviews.llvm.org/D23833llvm-svn: 279734