summaryrefslogtreecommitdiffstats
path: root/polly/lib/Transform
Commit message (Collapse)AuthorAgeFilesLines
...
* Dump YAML schedule tree as properly indented tree in DEBUG outputTobias Grosser2015-05-301-1/+8
| | | | llvm-svn: 238645
* Add indvar pass to canonicalization sequenceTobias Grosser2015-05-301-0/+1
| | | | | | | | | | | | Running indvar before Polly is useful as this eliminates zexts as they commonly appear when a 32 bit induction variable (type int) was used on a 64 bit system. These zexts confuse our delinearization and prevent for example the successful delinearization of the nussinov kernel in polybench-c-4.1. This fixes http://llvm.org/PR23426 Suggested-by: Xing Su <xsu.llvm@outlook.com> llvm-svn: 238643
* Update isl to 93b8e43dTobias Grosser2015-05-281-1/+1
| | | | | | | This update brings mostly interface cleanups, but also fixes two bugs in imath (a memory leak, some undefined behavior). llvm-svn: 238422
* Use value semantics for list of ScopStmt(s) instead of std::owningptrTobias Grosser2015-05-271-4/+4
| | | | | | | | | | | | | | | | David Blaike suggested this as an alternative to the use of owningptr(s) for our memory management, as value semantics allow to avoid the additional interface complexity caused by owningptr while still providing similar memory consistency guarantees. We could also have used a std::vector, but the use of std::vector would yield possibly changing pointers which currently causes problems as for example the memory accesses carry pointers to their parent statements. Such pointers should not change. Reviewer: jblaikie, jdoerfert Differential Revision: http://reviews.llvm.org/D10041 llvm-svn: 238290
* Use unique_ptr to clarify ownership of ScopStmtTobias Grosser2015-05-231-1/+1
| | | | llvm-svn: 238090
* Enable scalar and PHI code generation for PollyTobias Grosser2015-05-231-1/+1
| | | | | | | | | The feature itself has been committed by Johannes in r238070. As this is the way forward, we now enable it to ensure we get test coverage. Thank you Johannes for this nice work! llvm-svn: 238088
* Replace low-level constraint building with higher level functionsTobias Grosser2015-05-211-13/+6
| | | | | | | | Instead of explicitly building constraints and adding them to our maps we now use functions like map_order_le to add the relevant information to the maps. llvm-svn: 237934
* Add explicit #includes for used isl featuresTobias Grosser2015-05-092-0/+3
| | | | llvm-svn: 236931
* Sort include directivesTobias Grosser2015-05-094-12/+11
| | | | | | | | | | Upcoming revisions of isl require us to include header files explicitly, which have previously been already transitively included. Before we add them, we sort the existing includes. Thanks to Chandler for sort_includes.py. A simple, but very convenient script. llvm-svn: 236930
* Rename 'scattering' to 'schedule'Tobias Grosser2015-04-211-1/+1
| | | | | | | | | | | | | | | | In Polly we used both the term 'scattering' and the term 'schedule' to describe the execution order of a statement without actually distinguishing between them. We now uniformly use the term 'schedule' for the execution order. This corresponds to the terminology of isl. History: CLooG introduced the term scattering as the generated code can be used as a sequential execution order (schedule) or as a parallel dimension enumerating different threads of execution (placement). In Polly and/or isl the term placement was never used, but we uniformly refer to an execution order as a schedule and only later introduce parallelism. When doing so we do not talk about about specific placement dimensions. llvm-svn: 235380
* Make -polly-no-tiling work againTobias Grosser2015-04-051-1/+8
| | | | llvm-svn: 234125
* Do not scale tile loopsTobias Grosser2015-03-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We now generate tile loops as: for (int c1 = 0; c1 <= 47; c1 += 1) for (int c2 = 0; c2 <= 47; c2 += 1) for (int c3 = 0; c3 <= 31; c3 += 1) for (int c4 = 0; c4 <= 31; c4 += 4) #pragma simd for (int c5 = c4; c5 <= c4 + 3; c5 += 1) Stmt_for_body3(32 * c1 + c3, 32 * c2 + c5); instead of for (int c1 = 0; c1 <= 1535; c1 += 32) for (int c2 = 0; c2 <= 1535; c2 += 32) for (int c3 = 0; c3 <= 31; c3 += 1) for (int c4 = 0; c4 <= 31; c4 += 4) #pragma simd for (int c5 = c4; c5 <= c4 + 3; c5 += 1) Stmt_for_body3(c1 + c3, c2 + c5); Run-time performance-wise this makes little difference, but this gives a large reduction in compile time (10-30% on 17 LNT benchmarks). Apparently the isl AST generator is not yet very efficient in generating the latter. llvm-svn: 233675
* Drop libpluto supportTobias Grosser2015-03-301-270/+0
| | | | | | | | We do not have buildbots or anything that tests this functionality, hence it most likely bitrots. People interested to use this functionality can always recover it from svn history. llvm-svn: 233570
* Use schedule trees to perform post-scheduling transformationsTobias Grosser2015-03-221-220/+76
| | | | | | | | | | | | | | | | | | | Replacing the old band_tree based code with code that is based on the new schedule tree [1] interface makes applying complex schedule transformations a lot more straightforward. We now do not need to reason about the meaning of flat schedules, but can use a more straightforward tree structure. We do not yet exploit this a lot in the current code, but hopefully we will be able to do so soon. This change also allows us to drop some code, as isl now provides some higher level interfaces to apply loop transformations such as tiling. This change causes some small test case changes as isl uses a slightly different way to perform loop tiling, but no significant functional changes are intended. [1] http://impact.gforge.inria.fr/impact2014/papers/impact2014-verdoolaege.pdf llvm-svn: 232911
* Add some missing __isl_give/__isl_keep annotationsTobias Grosser2015-03-191-7/+10
| | | | llvm-svn: 232711
* Create a dependence struct to hold dependence information for a SCoP.Johannes Doerfert2015-03-052-15/+16
| | | | | | | | | | | The new Dependences struct in the DependenceInfo holds all information that was formerly part of the DependenceInfo. It also provides the same interface for the user to access this information. This is another step to a more general ScopPass interface that does allow multiple SCoPs to be "in flight". llvm-svn: 231327
* Rename the Dependences pass to DependenceInfo [NFC]Johannes Doerfert2015-03-043-22/+22
| | | | | | | | | | We rename the Dependences pass to DependenceInfo as a first step to a caching pass policy. The new DependenceInfo pass will later provide "Dependences" for a SCoP. To keep consistency the test folder is renamed too. llvm-svn: 231308
* [Refactor] Use virtual and override appropriatelyJohannes Doerfert2015-03-012-7/+7
| | | | | | | + Add override for overwritten methods. + Remove virtual for methods we do not want to be overwritten. llvm-svn: 230898
* [Refactor] Add a Scop & as argument to printScopJohannes Doerfert2015-03-013-6/+6
| | | | | | This is the first step in the interface simplification. llvm-svn: 230897
* Do some preparation even with scalar and phi modeling enabledJohannes Doerfert2015-02-272-9/+7
| | | | llvm-svn: 230790
* Fix formattingTobias Grosser2015-02-162-4/+2
| | | | llvm-svn: 229360
* Update Polly for the removal of LLVM_DELETED_FUNCTION now that '= delete' ↵David Blaikie2015-02-152-4/+4
| | | | | | works on all supported compilers (MSVC2012 compat has been dropped) llvm-svn: 229344
* Do not try to optimize empty SCoPs.Johannes Doerfert2015-02-141-0/+8
| | | | llvm-svn: 229253
* [PM] Convert Polly over to directly use the legacy pass managerChandler Carruth2015-02-131-2/+2
| | | | | | | | | namespace and header rather than the top-level header and using declarations. These helpers impede modular builds and are going away. Migrating away from them will also be necessary to start mixing in any usage of the new pass manager. llvm-svn: 229091
* Add early exits for SCoPs we did not optimizeJohannes Doerfert2015-02-111-3/+37
| | | | | | | | | | | | | This allows us to skip ast and code generation if we did not optimize a SCoP and will not generate parallel or alias annotations. The initial heuristic to exit is simple but allows improvements later on. All failing test cases have been modified to disable early exit, thus to keep their coverage. Differential Revision: http://reviews.llvm.org/D7254 llvm-svn: 228851
* Do not run independent blocks when we model all scalar dependencesJohannes Doerfert2015-02-061-0/+6
| | | | llvm-svn: 228441
* Model PHI nodes without demoting themJohannes Doerfert2015-02-062-1/+6
| | | | | | | | | | This allows us to model PHI nodes in the polyhedral description without demoting them. The modeling however will result in the same accesses as the demotion would have introduced. Differential Revision: http://reviews.llvm.org/D7415 llvm-svn: 228433
* [FIX] Debug build + instrinsic handlingJohannes Doerfert2015-01-261-25/+4
| | | | | | | The ignored intrinsics needed to be ignored in three other places as well. Tests and lnt pass now. llvm-svn: 227092
* [FIX] Independent blocks with intrinsics handlingJohannes Doerfert2015-01-251-1/+29
| | | | | | Also an old option was removed from some new test cases llvm-svn: 227057
* Drop an unused parameterTobias Grosser2015-01-211-5/+3
| | | | llvm-svn: 226739
* [PM] Update Polly following LLVM r226373 which refactors LoopInfo inChandler Carruth2015-01-172-8/+8
| | | | | | preparation for the new pass manager. llvm-svn: 226374
* Dead code elimination: Update dependences after eliminating codeTobias Grosser2014-12-171-1/+7
| | | | | | | | | | | | Without updating dependences we may lose implicit transitive dependences for which all explicit dependences have gone through the statement iterations we have just eliminated. No test case. We should probably implement a -verify-dependences option. This fixes llvm.org/PR21227 llvm-svn: 224459
* Drop Cloog supportJohannes Doerfert2014-12-021-4/+0
| | | | | | | | | This commit drops the Cloog support for Polly. The scripts and documentation are changed to only use isl as prerequisity. In the code all Cloog specific parts have been removed and all relevant tests have been ported to the isl backend when it was created. llvm-svn: 223141
* Remove Polly's IndVarSimplify passTobias Grosser2014-11-301-2009/+0
| | | | | | | | Polly had a copy of this pass to create the canonical induction variables necessary for the non-scev-based code generation. As we now always use SCEV based code generation, canonical induction variables are not needed any more. llvm-svn: 222979
* Remove -polly-codegen-scev option and related codeTobias Grosser2014-11-302-34/+8
| | | | | | | | SCEV based code generation has been the default for two weeks after having been tested for a long time. We now drop the support the non-scev-based code generation. llvm-svn: 222978
* Use new Small(Ptr)Set APITobias Grosser2014-11-191-2/+2
| | | | | | This fixes the recent build failures. llvm-svn: 222358
* Independent blocks: SE->forget() scalars translated to arraysTobias Grosser2014-11-161-0/+1
| | | | | | | | | | This prevents SCEVs to reference values not valid any more and as a consequence solves a bug where such values reintroduced during ast generation caused the independent blocks pass to fail validation. http://llvm.org/PR21204 llvm-svn: 222103
* Use stringFromIslObj instead of isl_..._dump to print to dbgs()Tobias Grosser2014-10-221-6/+5
| | | | | | | | | This makes sure we consistently use dbgs() when printing debug output. Previously, the code just mixed calls to isl_*_dump() with printing to dbgs() and was relying for both methods to interact in predictable ways (same output stream, no unexpected reordering of outputs). llvm-svn: 220443
* [Fix] isl usage errors in ScheduleOptimizerJohannes Doerfert2014-08-201-3/+3
| | | | llvm-svn: 216084
* Added arcanist linters and cleaned errors and warningsJohannes Doerfert2014-08-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Arcanist (arc) will now always run linters before uploading any new commit to Phabricator. All errors/warnings (or their absence) will be shown in the web interface together with a explanation by the commiter (arcanist will ask the commiter if the build was not clean). The linters include: - clang-format - spelling check - permissions check (aka. chmod) - filename check - merge conflict marker check Note, that their scope is sometimes limited (see .arclint for details). This commit also fixes all errors and warnings these linters reported, namely: - spelling mistakes and typos - executable permissions for various text files Differential Revision: http://reviews.llvm.org/D4916 llvm-svn: 215871
* [Polly] Remove the PoCC and ScopLib supportJohannes Doerfert2014-08-131-282/+0
| | | | | | | | | Remove the PoCC and ScopLib support from Polly as we do not have a user/maintainer for it. Differential Revision: http://reviews.llvm.org/D4871 llvm-svn: 215563
* No need to run -mem2reg twiceTobias Grosser2014-08-021-1/+0
| | | | llvm-svn: 214632
* Update for RegionInfo changes.Matt Arsenault2014-07-192-5/+8
| | | | | | | Mostly related to missing includes and renaming of the pass to RegionInfoPass. llvm-svn: 213457
* DeadCodeElimination: Fix liveout computationTobias Grosser2014-07-141-14/+22
| | | | | | | | | | | | | | | We move back to a simple approach where the liveout is the last must-write statement for a data-location plus all may-write statements. The previous approach did not work out. We would have to consider per-data-access dependences, instead of per-statement dependences to correct it. As this adds complexity and it seems we would not gain anything over the simpler approach that we implement in this commit, I moved us back to the old approach of computing the liveout, but enhanced it to also add may-write accesses. We also fix the test case and explain why we can not perform dead code elimination in this case. llvm-svn: 212925
* Remove unnecessary isl annotationsTobias Grosser2014-07-111-2/+2
| | | | | | | They where just left over from copy-pasting. Reported-by: Johannes Doerfert <jdoerfert@codeaurora.org> llvm-svn: 212800
* DeadCodeElim: Compute correct liveout for non-affine accessesTobias Grosser2014-07-111-15/+25
| | | | | | | Thanks to Johannes Doerfert for narrowing down the bug. Reported-by: Chris Jenneisch <chrisj@codeaurora.org> llvm-svn: 212796
* clang-format polly to avoid buildbot noiseTobias Grosser2014-07-092-46/+44
| | | | llvm-svn: 212609
* [C++11] Use more range based forsTobias Grosser2014-06-284-68/+51
| | | | llvm-svn: 211981
* Model statement wise reduction dependencesJohannes Doerfert2014-06-201-1/+2
| | | | | | | | | | | | | + Collect reduction dependences + Introduced TYPE_RED in Dependences.h which can be used to obtain the reduction dependences + Used TYPE_RED to prevent parallelization while we do not have a privatizing code generation + Relax the dependences for non-parallel code generation + Add privatization dependences to ensure correctness + 12 Test cases to check for reduction and privatization dependences llvm-svn: 211369
* Fix buildJohannes Doerfert2014-06-191-3/+5
| | | | | | See r210927 and r210847 llvm-svn: 211278
OpenPOWER on IntegriCloud