summaryrefslogtreecommitdiffstats
path: root/polly/test/Isl/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix the modifiable access creationJohannes Doerfert2014-08-031-16/+17
| | | | | | | | | | | | + Remove the class IslGenerator which duplicates the functionality of IslExprBuilder. + Use the IslExprBuilder to create code for memory access relations. + Also handle array types during access creation. + Enable scev codegen for one of the transformed memory access tests, thus access creation without canonical induction variables available. + Update one test case to the new output. llvm-svn: 214659
* Update the jscop tests and port them to isl codegen.Johannes Doerfert2014-08-0316-0/+492
| | | | | | | | The updated tests use a different context than the old ones did. Other than that only their path and the code generation we use changed. llvm-svn: 214657
* [Refactor] Use nicer print callback function in IslAstJohannes Doerfert2014-07-311-1/+0
| | | | llvm-svn: 214447
* Update for llvm change.Rafael Espindola2014-07-301-14/+14
| | | | llvm-svn: 214358
* [Refactor] Remove containsLoop to find innermost loopsJohannes Doerfert2014-07-241-9/+13
| | | | | | | | | Use the fact that if we visit a for node first in pre and next in post order we know we did not visit any children, thus we found an innermost loop. + Test case for an innermost loop with a conditional inside llvm-svn: 213870
* [Refactor] Unify IslAst print methodsJohannes Doerfert2014-07-231-1/+0
| | | | | | + Add const annotations to some member functions llvm-svn: 213779
* Annotate reduction parallel loops in the IslAst textual outputJohannes Doerfert2014-07-151-0/+38
| | | | | | | | | | + Introduced dependency type TYPE_TC_RED to represent the transitive closure (& the reverse) of reduction dependences. These are used when we check for reduction parallel loops. + Test cases including loop reversals and modulo schedules which compute reductions in a alternated order. llvm-svn: 213019
* Derive run-time conditions for delinearizationTobias Grosser2014-07-022-0/+72
| | | | | | | | | | | | | | | | | | | | | | | As our delinearization works optimistically, we need in some cases run-time checks that verify our optimistic assumptions. A simple example is the following code: void foo(long n, long m, long o, double A[n][m][o]) { for (long i = 0; i < 100; i++) for (long j = 0; j < 150; j++) for (long k = 0; k < 200; k++) A[i][j][k] = 1.0; } After clang linearized the access to A and we delinearized it again to A[i][j][k] we need to ensure that we do not access the delinearized array out of bounds (this information is not available in LLVM-IR). Hence, we need to verify the following constraints at run-time: CHECK: Assumed Context: CHECK: [o, m] -> { : m >= 150 and o >= 200 } llvm-svn: 212198
* Support for generating vectors for loads with -1 strideTobias Grosser2014-03-191-0/+38
| | | | | | | | This patch enables vectorization of loops containing backward array traversal (array stride is -1). Contributed-by: Chris Jenneisch <chrisj@codeaurora.org> llvm-svn: 204257
* Fix polly tests to not include aliases to declarations.Rafael Espindola2014-03-121-14/+42
| | | | llvm-svn: 203721
* Emit llvm.loop metadata for parallel loopsTobias Grosser2014-03-041-0/+102
| | | | | | | For now we only mark innermost loops for the loop vectorizer. We could later also mark not-innermost loops to enable the introduction of openmp parallelism. llvm-svn: 202854
* codegen: Update LoopInfo correctlyTobias Grosser2014-02-241-0/+29
| | | | | | | | | Add the 'polly.start' basic block to the loop that surrounds the scop we just codegenerate. This fixes PR13441 llvm-svn: 202000
* Use -polly-codegen-isl in isl-codegen testTobias Grosser2014-02-211-1/+1
| | | | | Reported-by: Sebastian Pop <spop@codeaurora.org> llvm-svn: 201902
* Codegen: Do not crash when seeing debug intrinsicsTobias Grosser2014-02-211-0/+80
| | | | | | | | | | We now skip the debug intrinsics which is a lot better than crashing due to uncopied metadata references. We should step by step investigate which debug intrinsics we can copy without trouble. We still keep the debug location metadata. llvm-svn: 201860
* Remove other unneccessary uses of -O3 in the test suiteTobias Grosser2014-01-272-3/+3
| | | | | | The polly test suite is now -O3 clean. llvm-svn: 200205
* Do not run -O3 to canonicalize test caseTobias Grosser2014-01-271-1/+1
| | | | | | | | | This is not only not necessary, but in case -03 changes this can actually cause arbitrarily failing test cases such as, e.g., a recent change by Chandler that caused -O3 to unroll the loop body, which made the loop we wanted to detect disappear and consequently this test case fail. llvm-svn: 200204
* IslCodegen: Support for run-time conditionsTobias Grosser2013-11-171-0/+31
| | | | llvm-svn: 194948
* use -polly-codegen-isl in tests under test/IslSebastian Pop2013-10-071-1/+1
| | | | llvm-svn: 192110
* ScopInfo: Correctly handle true/false conditionsTobias Grosser2013-09-071-1/+1
| | | | | | | This is a modified version of the orignally contributed patch. Contributed-by: alexandre.isoard@gmail.com llvm-svn: 190237
* scop detection: do not run scop detection on regions without loopsSebastian Pop2013-06-032-3/+3
| | | | | | | otherwise, use -polly-detect-scops-in-regions-without-loops to also detect scops in regions without loops llvm-svn: 183113
* Test that independent block pass does not transform induction variablesTobias Grosser2013-05-311-37/+0
| | | | | | | | | | | The original test case showed a problem with the independet blocks pass and we decided to XFAIL it for now. Unfortunately the failure is not detected if we build without asserts and the verification of the independent block pass is not run. This change tests now for the actual reason of the failure and should trigger even in a non asserts build. We did not yet solve the underlying bug, but this should at least make the test suite behavior consistent. llvm-svn: 183025
* scop detection: only handle functions with loopsSebastian Pop2013-05-301-1/+1
| | | | | | to detect scops in functions with no loops, use -polly-detect-scops-in-functions-without-loops llvm-svn: 182941
* Update LoopInfo correctlyTobias Grosser2013-05-161-1/+8
| | | | | | | | | | When the Polly code generation was written we did not correctly update the LoopInfo data, but still claimed that the loop information is correct. This does not only lead to missed optimizations, but it can also cause miscompilations in case passes such as LoopSimplify are run after Polly. Reported-by: Sergei Larin <slarin@codeaurora.org> llvm-svn: 181987
* IndependentBlocks: We can only reconstruct PHI nodes that are within the ScoPTobias Grosser2013-04-171-2/+0
| | | | | | | | | | In the classical (non -polly-codegen-scev) mode, we assume that we can always recreate PHI nodes during code generation. This is not true. We can only reconstruct them from the polyhedral information, in case the entire loop of the PHI node is part of the SCoP and consequently the PHI node was translated in the polyhedral description. llvm-svn: 179674
* Remove unneeded RegionSimplify pass.Tobias Grosser2013-04-173-42/+7
| | | | | | | | | | | | | We now support regions with multiple entries and multiple exits natively. Regions are not needed to be simplified to single entry and single exit. We need to XFAIL two test cases as this change increases the scop coverage and uncoveres two failures in the independent blocks pass. The first failure will be fixed in a subsequent commit, the second one is in the non-default -polly-codegen-scev mode and still needs to be fixed. Contributed-by: Star Tan <tanmx_star@yeah.net> llvm-svn: 179673
* tests: Fix 'instruction does not dominate all its uses' errorTobias Grosser2013-04-171-1/+1
| | | | | | The LLVM-IR of this test case was apperently incorrect. llvm-svn: 179672
* Support SCoPs with multiple entry edges.Tobias Grosser2013-04-161-0/+71
| | | | | | | | | | | | | | | | | | | | | Regions that have multiple entry edges are very common. A simple if condition yields e.g. such a region: if / \ then else \ / for_region This for_region contains two entry edges 'then' -> 'for_region' and 'else' -> 'for_region'. Previously we scheduled the RegionSimplify pass to translate such regions into simple regions. With this patch, we now support them natively when the region is in -loop-simplify form, which means the entry block should not be a loop header. Contributed by: Star Tan <tanmx_star@yeah.net> llvm-svn: 179586
* Support SCoPs with multiple exit edgesTobias Grosser2013-04-102-0/+75
| | | | | | | | | | | | | | | | | | | | | | Regions that have multiple exit edges are very common. A simple if condition yields e.g. such a region: if / \ then else \ / after Region: if -> after This regions contains the bbs 'if', 'then', 'else', but not 'after'. It has two exit edges 'then' -> 'after' and 'else' -> 'after'. Previously we scheduled the RegionSimplify pass to translate such regions into simple regions. With this patch, we now support them natively. Contributed-by: Star Tan <tanmx_star@yeah.net> llvm-svn: 179159
* IndependentBlocks: translate out of SSA all uses escaping the regionSebastian Pop2013-04-082-0/+75
| | | | llvm-svn: 179019
* codegen: properly instantiate SCEVs to the place where they are usedTobias Grosser2013-03-221-2/+1
| | | | | | | | | | | | | | | | | | | | Given the following code for (i = 0; i < 10; i++) { ; } S: A[i] = 0 When code generating S using scev based code generation, we need to retrieve the scev of 'i' at the location of 'S'. If we do not do this the scev that we obtain will be expressed as {0,+,1}_for and will reference loop iterators that do not surround 'S' and that we consequently do not know how to code generate. What we really want is the scev to be instantiated to the value of 'i' after the loop. This value is {10} and it can be code generated without troubles. llvm-svn: 177777
* Add failing test caseTobias Grosser2013-03-211-0/+22
| | | | llvm-svn: 177645
* Use attributes references on call/invoke instructions.Bill Wendling2013-02-222-12/+15
| | | | llvm-svn: 175881
* [isl-codegen]: Fix off by one in getNumberOfIterationsTobias Grosser2013-02-111-0/+29
| | | | | | | | | | | | | | We need to remove one dimension. Any is correct as long as it exists. We have choosen for whatever reason the dimension #dims - 2. This is incorrect if there is just one dimension. For CLooG this case did never happen. For isl however, the case can happen and causes undefined behavior including crashes. We choose now always the last dimension #dims - 1. We could have choosen dimension '0' but the last dimension is what we remove conceptionally in the algorithm, so it seems better to actually program it that way. While at it remove another piece of undefined behavior. llvm-svn: 174894
* isl: vector code generation based on ISL astSebastian Pop2012-12-1810-0/+532
| | | | | | Original patch by Tobias Grosser, slightly modified by Sebastian Pop. llvm-svn: 170420
* adapt cloog codegen testcases to islSebastian Pop2012-12-0338-0/+2616
| | | | llvm-svn: 169161
* execute cloog specific testcases only with CLOOG_FOUNDSebastian Pop2012-12-0310-0/+431
llvm-svn: 169159
OpenPOWER on IntegriCloud