summaryrefslogtreecommitdiffstats
path: root/polly/unittests
Commit message (Collapse)AuthorAgeFilesLines
...
* [Support] Add computeArrayUnused. NFC.Michael Kruse2017-02-041-0/+66
| | | | | | | This function has been extracted from the upcoming DeLICM patch (https://reviews.llvm.org/D24716). llvm-svn: 294093
* [Support] Add computeReachingWrite. NFC.Michael Kruse2017-02-041-0/+104
| | | | | | | This function has been extracted from the upcoming DeLICM patch (https://reviews.llvm.org/D24716). llvm-svn: 294092
* Update to recent formatting changesTobias Grosser2017-02-011-3/+2
| | | | llvm-svn: 293756
* [Support] Add general isl tools for DeLICM. NFC.Michael Kruse2017-01-271-0/+296
| | | | | | | | | Add some generally useful isl tools into a their own new ISLTools.cpp. These are the helpers were extracted from and will be use by the DeLICM algorithm (https://reviews.llvm.org/D24716). Suggested-by: Tobias Grosser <tobias@grosser.es> llvm-svn: 293340
* Adjust formatting to commit r292110 [NFC]Tobias Grosser2017-01-161-9/+12
| | | | llvm-svn: 292123
* Teach Polly's unittest macro to link LLVMDemangle which LLVMSupport nowChandler Carruth2017-01-111-1/+1
| | | | | | depends on... llvm-svn: 291637
* Add unittests for foreach(Elt|Piece). NFC.Michael Kruse2016-12-071-0/+107
| | | | llvm-svn: 288925
* Add -polly-flatten-schedule pass.Michael Kruse2016-09-083-0/+74
| | | | | | | | | | | | | | | | | | | | | | | | | The -polly-flatten-schedule pass reduces the number of scattering dimensions in its isl_union_map form to make them easier to understand. It is not meant to be used in production, only for debugging and regression tests. To illustrate, how it can make sets simpler, here is a lifetime set used computed by the porposed DeLICM pass without flattening: { Stmt_reduction_for[0, 4] -> [0, 2, o2, o3] : o2 < 0; Stmt_reduction_for[0, 4] -> [0, 1, o2, o3] : o2 >= 5; Stmt_reduction_for[0, 4] -> [0, 1, 4, o3] : o3 > 0; Stmt_reduction_for[0, i1] -> [0, 1, i1, 1] : 0 <= i1 <= 3; Stmt_reduction_for[0, 4] -> [0, 2, 0, o3] : o3 <= 0 } And here the same lifetime for a semantically identical one-dimensional schedule: { Stmt_reduction_for[0, i1] -> [2 + 3i1] : 0 <= i1 <= 4 } Differential Revision: https://reviews.llvm.org/D24310 llvm-svn: 280948
* Avoid the use of large unsigned values in isl unit testTobias Grosser2016-08-261-1/+3
| | | | | | | | | isl_val_int_from_ui takes an 'unsigned long' which has on 32-bit and LLP64 windows systems only 32 bit. Hence, make sure we do not use it with constants that are larger than 32 bit. Reported-by: Michael Kruse <llvm@meinersbur.de> llvm-svn: 279824
* unittests: Make the expected value the first argument in EXPECT_EQ [NFC]Tobias Grosser2016-08-261-33/+32
| | | | | | | | | | | This improves the readability of failing test results, as gtest prints always the first argument as the 'expected value'. In the previous commit we already changed the tests for isl_valFromAPInt. In this commit, the tests for IslValToAPInt follow. Suggested-by: Michael Kruse <llvm@meinersbur.de> llvm-svn: 279817
* Improve documentation and testing for isl_valFromAPIntTobias Grosser2016-08-261-4/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | The recent unit tests we gained made clear that the semantics of isl_valFromAPInt are not clear, due to missing documentation. In this change we document both the calling interface as well as the implementation of isl_valFromAPInt. We also make the implementation easier to read by removing integer wrappig in abs() when passing in the minimal integer value for a given bitwidth. Even though wrapping and subsequently interpreting the result as unsigned value gives the correct result, this is far from obvious. Instead, we explicitly add one more bit to the input type to ensure that abs will never wrap. This change did not uncover a bug in the old implementation, but was introduced to increase readability. We update the tests to add a test case for this special case and use this opportunity to also test a number larger than 64 bit. Finally, we order the arguments of the test cases to make sure the expected output is first. This helps readability in case of failing test cases as gtest assumes the first value to be the exected value. Reviewed-by: Michael Kruse <llvm@meinersbur.de> Differential Revision: https://reviews.llvm.org/D23917 llvm-svn: 279815
* Improve documentation and testing of APIntFromValTobias Grosser2016-08-261-3/+88
| | | | | | | | | | | | | | The recent unit tests we gained made clear that the semantics of APIntFromVal are not clear, due to missing documentation. In this change we document both the calling interface as well as the implementation of APIntFromVal. We also make the implementation easier to read by removing the use of magic numbers. Finally, we add tests to check the bitwidth of the created values as well as the correct modeling of very large numbers. Reviewed-by: Michael Kruse <llvm@meinersbur.de> Differential Revision: https://reviews.llvm.org/D23910 llvm-svn: 279813
* Do not build unittests by default.Michael Kruse2016-08-251-1/+1
| | | | | | | | | Only build them for check-polly and check-polly-unittests in out-of-tree builds. In LLVM, this behaviour is controlled with LLVM_BUILD_TESTS. Polly out-of-tree does not have such a flag. llvm-svn: 279740
* Introduce unittests.Michael Kruse2016-08-253-0/+126
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
OpenPOWER on IntegriCloud