aboutsummaryrefslogtreecommitdiff
path: root/polly/test/CMakeLists.txt
AgeCommit message (Collapse)AuthorFilesLines
2022-09-14[CMake] Avoid `LLVM_BINARY_DIR` when other more specific variable are ↵John Ericson1-1/+1
better-suited, part 2 A simple sed doing these substitutions: - `${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}\>` -> `${LLVM_LIBRARY_DIR}` - `${LLVM_BINARY_DIR}/bin\>` -> `${LLVM_TOOLS_BINARY_DIR}` where `\>` means "word boundary". The only manual modifications were reverting changes in - `runtimes/CMakeLists.txt` because these were "entry points" where we wanted to tread carefully not not introduce a "loop" which would end with an undefined variable being expanded to nothing. There are some `${LLVM_BINARY_DIR}/lib` without the `${LLVM_LIBDIR_SUFFIX}`, but these refer to the lib subdirectory of the source (`llvm/lib`). That `lib` is automatically appended to make the local `CMAKE_CURRENT_BINARY_DIR` value by `add_subdirectory`; since the directory name in the source tree is fixed without any suffix, the corresponding `CMAKE_CURRENT_BINARY_DIR` will also be. We therefore do not replace it but leave it as-is. This picks up where D133828 left off, getting the occurrences with*out* `CMAKE_CFG_INTDIR`. But this is difficult to do correctly and so not done in the (retroactively) previous diff. This hopefully increases readability overall, and also decreases the usages of `LLVM_LIBDIR_SUFFIX`, preparing us for D130586. Reviewed By: sebastian-ne Differential Revision: https://reviews.llvm.org/D132316
2022-08-25Revert "[CMake] Avoid `LLVM_BINARY_DIR` when other more specific variable ↵John Ericson1-1/+1
are better-suited" This reverts commit ad8c34bc3089d847a09bb740f7a58c96073e0959.
2022-08-24Exclude check-polly-unittests and check-polly-isl from check-allEli Friedman1-0/+2
The unittests are already included in check-polly, so check-all was running them twice. Running them twice causes a race on the output files, which led to intermittent failures on the reverse-iteration buildbot.
2022-08-24[CMake] Avoid `LLVM_BINARY_DIR` when other more specific variable are ↵John Ericson1-1/+1
better-suited A simple sed doing these substitutions: - `${LLVM_BINARY_DIR}/(\$\{CMAKE_CFG_INTDIR}/)?lib(${LLVM_LIBDIR_SUFFIX})?\>` -> `${LLVM_LIBRARY_DIR}` - `${LLVM_BINARY_DIR}/(\$\{CMAKE_CFG_INTDIR}/)?bin\>` -> `${LLVM_TOOLS_BINARY_DIR}` where `\>` means "word boundary". The only manual modifications were reverting changes in - `compiler-rt/cmake/Modules/CompilerRTUtils.cmake - `runtimes/CMakeLists.txt` because these were "entry points" where we wanted to tread carefully not not introduce a "loop" which would end with an undefined variable being expanded to nothing. This hopefully increases readability overall, and also decreases the usages of `LLVM_LIBDIR_SUFFIX`, preparing us for D130586. Reviewed By: sebastian-ne Differential Revision: https://reviews.llvm.org/D132316
2022-08-18Revert "[cmake] Use `CMAKE_INSTALL_LIBDIR` too"John Ericson1-1/+1
This reverts commit f7a33090a91015836497c75f173775392ab0304d. Unfortunately this causes a number of failures that didn't show up in my local build.
2022-08-18[cmake] Use `CMAKE_INSTALL_LIBDIR` tooJohn Ericson1-1/+1
We held off on this before as `LLVM_LIBDIR_SUFFIX` conflicted with it. Now we return this. `LLVM_LIBDIR_SUFFIX` is kept as a deprecated way to set `CMAKE_INSTALL_LIBDIR`. The other `*_LIBDIR_SUFFIX` are just removed entirely. I imagine this is too potentially-breaking to make LLVM 15. That's fine. I have a more minimal version of this in the disto (NixOS) patches for LLVM 15 (like previous versions). This more expansive version I will test harder after the release is cut. Reviewed By: sebastian-ne, ldionne, #libc, #libc_abi Differential Revision: https://reviews.llvm.org/D130586
2021-08-28[Polly][test] Add dependency to count.Michael Kruse1-1/+1
Polly does not use the count program itself, but somewhere in lit it is expected to exists. Otherwise, the following error occurs: llvm-lit: llvm-project/llvm/utils/lit/lit/llvm/subst.py:133: fatal: Did not find count in ./bin
2018-03-05[Polly][CMake] Fix lit setup for building the in the mono repoPhilip Pfaffe1-1/+5
Summary: When building polly as part of the monorepo (actually, as part of any setup using LLVM_ENABLE_PROJECTS), the LLVMPolly library used in the lit tests ends up in a different directory in the build tree than in an in-tree build Reviewers: Meinersbur, grosser, bollu Reviewed By: Meinersbur Subscribers: mgorny, bollu, pollydev, llvm-commits Differential Revision: https://reviews.llvm.org/D44078 llvm-svn: 326702
2017-07-19[CMake] Fix r307650: Readd missing dependency.Philip Pfaffe1-1/+2
The commit erroneously removed the dependency of the Polly tests on things like opt and FileCheck. Add that dependency back. llvm-svn: 308512
2017-07-11[Polly][CMake] Skip unit-tests in lit if gtest is not availablePhilip Pfaffe1-5/+5
Summary: 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, grosser Reviewed By: grosser Subscribers: mgorny, bollu, pollydev, llvm-commits Tags: #polly Differential Revision: https://reviews.llvm.org/D34053 llvm-svn: 307651
2017-07-11[Polly][CMake] Use the CMake Package instead of llvm-config in out-of-tree ↵Philip Pfaffe1-159/+90
builds Summary: As of now, Polly uses llvm-config to set up LLVM dependencies in an out-of-tree build. This is problematic for two reasons: 1) Right now, in-tree and out-of-tree builds in fact do different things. E.g., in an in-tree build, libPolly depends on a handful of LLVM libraries, while in an out-of-tree build it depends on all of them. This means that we often need to treat both paths seperately. 2) I'm specifically unhappy with the way libPolly is linked right now, because it just blindly links against all the LLVM libs. That doesn't make a lot of sense. For instance, one of these libs is LLVMTableGen, which contains a command line definition of a -o option. This means that I can not link an out-of-tree libPolly into a tool which might want to offer a -o option as well. This patch (mostly) drop the use of llvm-config in favor of LLVMs exported cmake package. However, building Polly with unittests requires access to the gtest sources (in the LLVM source tree). If we're building against an LLVM installation, this source tree is unavailable and must specified. I'm using llvm-config to provide a default in this case. Reviewers: Meinersbur, grosser Reviewed By: grosser Subscribers: tstellar, bollu, chapuni, mgorny, pollydev, llvm-commits Differential Revision: https://reviews.llvm.org/D33299 llvm-svn: 307650
2017-05-04[CMake] Remove POLLY_TEST_DIRECTORIES.Michael Kruse1-22/+0
The test subdirectory POLLY_TEST_DIRECTORIES was heavily outdated and only used in out-of-LLVM-tree builds (to generate polly-test-${subdir} targets). llvm-svn: 302142
2017-02-27[Cmake] Optionally use a system isl version.Michael Kruse1-17/+27
This patch adds an option to build against a version of libisl already installed on the system. The installation is autodetected using the pkg-config file shipped with isl. The detection of the library is in the FindISL.cmake module that creates an imported target. Contributed-by: Philip Pfaffe <philip.pfaffe@gmail.com> Differential Revision: https://reviews.llvm.org/D30043 llvm-svn: 296361
2016-10-16[cmake] Add polly-isl-test dependency to lit tests.Michael Kruse1-1/+1
Also handle the in-llvm-tree case forgotten in r284339. llvm-svn: 284347
2016-10-16[cmake] Add polly-isl-test dependency to lit tests.Michael Kruse1-1/+1
lit recursively iterates through the test subdirectories and finds the ISL unittest. For this test to work, the polly-isl-test executable needs to be compiled. Add the polly-isl-test dependency to POLLY_TEST_DEPS. This makes check-polly and check-polly-tests work from a fresh build directory. llvm-svn: 284339
2016-10-07[cmake] Move isl_test artifacts to Polly folder.Michael Kruse1-0/+1
Folders in Visual Studio solutions help organize the build artifacts from all LLVM projects. There is a folder to keep Polly-built files in. llvm-svn: 283546
2016-10-04Build and run isl_test as part of check-pollyTobias Grosser1-0/+23
Running isl tests is important to gain confidence that the isl build we created works as expected. Besides the actual isl tests, there are also isl AST generation tests shipped with isl. This change only adds support for the isl unit tests. AST generation test support is left for a later commit. There is a choice to run tests directly through the build system or in the context of lit. We choose to run tests as part of lit to as this allows us to easily set environment variables, print output only on error and generally run the tests directly from the lit command. Reviewers: brad.king, Meinersbur Subscribers: modocache, brad.king, pollydev, beanz, llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D25155 llvm-svn: 283245
2016-09-19Fix spelling in CMakeListsTobias Grosser1-1/+1
llvm-svn: 281897
2016-09-05Add check-polly-tests build target.Michael Kruse1-5/+9
The check-polly-tests target runs regression/unit tests but without checking formatting. This is useful to not having to reload a file in an open editor (which eg. clears the undo buffer, moves cursor/window position) when running polly-update-format. After this change, the following test targets exist: - check-polly-unittests to run unittests only - check-polly-tests to run unit and regression tests - polly-check-format to check formatting using clang-format - check-polly to run them all As a side-effect, when running check-polly, polly-check-format and run in parallel (instead of polly-check-format first). Differential Revision: https://reviews.llvm.org/D24191 llvm-svn: 280654
2016-08-25Introduce unittests.Michael Kruse1-1/+41
Add the infrastructure for unittests to Polly and two simple tests for conversion between isl_val and APInt. In addition, a build target check-polly-unittests is added to run only the unittests but not the regression tests. Clang's unittest mechanism served as as a blueprint which then was adapted to Polly. Differential Revision: https://reviews.llvm.org/D23833 llvm-svn: 279734
2016-08-25Use configure_lit_site_cfg instead of configure_file.Michael Kruse1-4/+19
configure_lit_site_cfg defines some more parameters that are used in lit.site.cfg.in. configure_file would leave those empty. These additional definitions seem to be unimportant for regression tests, but unittests do not work without them. In case of out-of-tree builds, define the additional parameters with default values. These may not take all configuration parameters into account, as configure_lit_site_cfg would. llvm-svn: 279733
2016-02-29Reapply "Add update_test.py script."Michael Kruse1-0/+8
Originally committed in r261899 and reverted in r262202 due to failing in out-of-LLVM tree builds. Replace the use of LLVM_TOOLS_BINARY_DIR by LLVM_TOOLS_DIR which exists in both, in-tree and out-of-tree builds. Original commit message: The script updates a lit test case that uses FileCheck using the actual output of the 'RUN:'-lines program. Useful when updating test cases due to expected output changes and diff'ing expected and actual output. llvm-svn: 262227
2016-02-29Revert "Add update_test.py script."Tobias Grosser1-8/+0
This reverts commit r261899. Even though I am not yet 100% certain, this is commit is the only one that has some relation to the recent cmake failures in Polly. llvm-svn: 262202
2016-02-25Add update_test.py script.Michael Kruse1-0/+8
The script updates a lit test case that uses FileCheck using the actual output of the 'RUN:'-lines program. Useful when updating test cases due expected output changes and diff'ing expected and actual output. llvm-svn: 261899
2015-09-15Fix after renamed CMake cache entryMichael Kruse1-2/+5
LLVM_EXTERNAL_CLANG_BUILD was changed to LLVM_TOOL_CLANG_BUILD in r242059. llvm-svn: 247675
2015-09-14Run polly-check-format with unit testsMichael Kruse1-0/+8
Add polly-check-format as dependency of check-polly if clang-format is available in the same build. Differential Revision: http://reviews.llvm.org/D12850 llvm-svn: 247600
2015-07-21Unify FOLDER property of Polly targetsMichael Kruse1-1/+4
Put all Polly targets into a single "Polly" category (i.e. solution folder). Previously there was no recognizable scheme and most categories contained just one or two targets or targets didn't belong to any category. Reviewers: grosser llvm-svn: 242779
2015-03-30Drop some CLooG leftoversTobias Grosser1-1/+0
llvm-svn: 233572
2015-01-19[multilib] Teach Polly's CMake to use the libdir suffix variable. ThisChandler Carruth1-1/+1
lets 'ninja check-polly' pass for me with a lib64 build of LLVM. I've not updated the standalone side as I don't use it and don't have an easy way to test any changes I've made there. I mostly wanted to be able to actually run Polly's tests when I update its use of LLVM's APIs during my refactorings on the (very unlikely) off chance that I make a change which compiles but does the wrong thing. llvm-svn: 226420
2014-05-14Do not run GPGPU test cases without nvptx targetTobias Grosser1-1/+1
Tag the GPGPU codegen test cases as unsupported if the nvptx target is not included in the current llvm build. Contributed-by: Yabin Hu <yabin.hwu@gmail.com> llvm-svn: 208779
2014-05-12do not build llc and lli for polly testSebastian Pop1-1/+1
llvm-svn: 208619
2014-03-12add dependence of check-polly on llcSebastian Pop1-1/+1
to avoid an error when directly doing ninja check-polly after cmake 'Could not find llc in .../ninja/bin'. llvm-svn: 203696
2012-12-06Integrate polly test-suite into an llvm "make check-all" if built as part of ↵Andy Gibbs1-34/+50
the whole using cmake. llvm-svn: 169487
2012-10-21cmake: Use suffix for shared modules instead of the one for shared librariesTobias Grosser1-1/+1
On Linux there is no difference between shared modules and shared libaries, both are '.so' files. However, on darwin only shared modules are '.so' files. Shared libraries have the '.dynlib' suffix. Fix test cases on darwin by expecting a shared module suffix for Polly instead of a shared library suffix. This fixes PR14135 Reported by: Jack Howarth <howarth@bromo.med.uc.edu> llvm-svn: 166402
2012-03-29Use python script to silence the expected testcase fails on 32bit platform.Hongbin Zheng1-8/+0
llvm-svn: 153644
2012-03-26Don't fail the lli testcases on 32bit platform.Hongbin Zheng1-0/+8
llvm-svn: 153440
2012-03-16Off-tree build support: Set the path of Polly's library correctly.Hongbin Zheng1-0/+2
llvm-svn: 152924
2012-03-16Polly-test: Add a cmake option "POLLY_TEST_DISABLE_BAR". We can enableHongbin Zheng1-1/+2
this option in the configure step of Polly's builder to get more readable output from the stdio log. llvm-svn: 152910
2011-12-07ClooG: Make sure ambigous schedules do not introduce complicated codeTobias Grosser1-0/+1
Cloog continued to split the domains even after the scattering. This lead to complicated code. llvm-svn: 146033
2011-11-29test: Add more dependences to cmake buildTobias Grosser1-1/+1
llvm-svn: 145400
2011-11-22test: Do not hardcode '.so' as library suffixTobias Grosser1-0/+1
Contributed by: Marcello Maggioni <hayarms@gmail.com> llvm-svn: 145076
2011-08-25Fix crashes due to unaligned parametersTobias Grosser1-1/+2
Due to the recent introduction of isl_id, parameters need now always to be aligned. This was not yet taken care of in the code path of vectorization and dependence analysis. llvm-svn: 138555
2011-08-02Add a vect target to the polly testsuiteTobias Grosser1-1/+2
Contributed by: Sebastian Pop <sebpop@gmail.com> llvm-svn: 136685
2011-04-29Partial support test polly for out of tree build.Hongbin Zheng1-10/+23
llvm-svn: 130482
2011-04-29Add initial version of PollyTobias Grosser1-0/+52
This version is equivalent to commit ba26ebece8f5be84e9bd6315611d412af797147e in the old git repository. llvm-svn: 130476