summaryrefslogtreecommitdiffstats
path: root/polly/lib/Support
Commit message (Collapse)AuthorAgeFilesLines
...
* Make registerPollyPasses publicTobias Grosser2015-01-061-1/+1
| | | | | | This function is needed for the integration of Polly into Julia. llvm-svn: 225295
* Do not run dead code elimination by defaultTobias Grosser2014-12-101-1/+1
| | | | | | | The dead code elimination is a pass that looks very promising, but needs some more compile-time tuning before enabling it by default seems sensible. llvm-svn: 223965
* Drop Cloog supportJohannes Doerfert2014-12-021-24/+4
| | | | | | | | | 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-1/+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-301-2/+1
| | | | | | | | 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 isl_schedule_get_ctxTobias Grosser2014-11-211-5/+1
| | | | llvm-svn: 222560
* Remove an unnecessary ifdefTobias Grosser2014-11-161-7/+1
| | | | | Reported-by: Johannes Doerfert <doerfert@cs.uni-saarland.de> llvm-svn: 222102
* Switch default code generation backend to islTobias Grosser2014-11-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The isl based backend has been tested since a long time and with the recently commited OpenMP support the last missing piece of functionality was ported from the CLooG backend. The isl based backend gives us interesting new functionality: - Run-time alias checks (enabled by default) Optimize scops that contain possibly aliasing pointers. This feature has largely increased the number of loop nests we consider for optimization. Thanks Johannes! - Delinearization (not yet enabled by default) Model accesses to multi-dimensional arrays precisely. This will allow us to understand kernels with multi-dimensional VLAs written in Julia, boost::ublas, coremark or C99. Thanks Sebastian! - Generation of higher quality code Sven and me spent a long time to optimize the quality of the generated code. A major focus were expressions as they result from modulos/divisions or piecewise affine expressions (a ? b : c). - Full/Partial tile separation, polyhedral unrolling The isl code generation provides functionality to generate specialized code for core and cleanup loops and to specialize code using polyhedral context information while unrolling statements. (not yet exploited in Polly) - Modifieable access functions We can now use standard isl functionality to remap memory accesses to new data locations. A standard use case is the use of shared memory, where accesses to a larger region in global memory need to be mapped to a smaller shared memory region using a modulo mapping. (not yet exploited in Polly) The cloog based code generation is still available for comparision, but is scheduled for removal. llvm-svn: 222101
* Add OpenMP code generation to isl backendTobias Grosser2014-11-151-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This backend supports besides the classical code generation the upcoming SCEV based code generation (which the existing CLooG backend does not support robustly). OpenMP code generation in the isl backend benefits from our run-time alias checks such that the set of loops that can possibly be parallelized is a lot larger. The code was tested on LNT. We do not regress on builds without -polly-parallel. When using -polly-parallel most tests work flawlessly, but a few issues still remain and will be addressed in follow up commits. SCEV/non-SCEV codegen: - Compile time failure in ldecod and TimberWolfMC due a problem in our run-time alias check generation triggered by pointers that escape through the OpenMP subfunction (OpenMP specific). - Several execution time failures. Due to the larger set of loops that we now parallelize (compared to the classical code generation), we currently run into some timeouts in tests with a lot loops that have a low trip count and are slowed down by parallelizing them. SCEV only: - One existing failure in lencod due to llvm.org/PR21204 (not OpenMP specific) OpenMP code generation is the last feature that was only available in the CLooG backend. With the isl backend being the only one supporting features such as run-time alias checks and delinearization, we will soon switch to use the isl ast generator by the default and subsequently remove our dependency on CLooG. http://reviews.llvm.org/D5517 llvm-svn: 222088
* [Refactor][NFC] Generalize the creation of ScopArrayInfo objects.Johannes Doerfert2014-11-071-0/+6
| | | | | | Differential Revision: http://reviews.llvm.org/D6031 llvm-svn: 221512
* [Refactor][NFC] Map basic blocks to SCoP statements.Johannes Doerfert2014-10-311-5/+2
| | | | | | | This will simplify the construction of domains and the modeling of PHI's. llvm-svn: 221015
* Use braces in multi-statement DEBUG() code [NFC]Tobias Grosser2014-10-221-3/+11
| | | | | | | | | | | | | | | | | | By adding braces into the DEBUG statement we can make clang-format format code such as: DEBUG(stmt1(); stmt2()) as multi-line code: DEBUG({ stmt1(); stmt2(); }); This makes control-flow in debug statements easier to read. llvm-svn: 220441
* [Refactor] Change the comment style to silence -WcommentJohannes Doerfert2014-10-071-2/+2
| | | | | | | | | -Wcomment complained about a "multi-line comment" caused by the ascii art used in ScopHelper to describe the CFG. Differential Revision: http://reviews.llvm.org/D5618 llvm-svn: 219207
* Allow to annotate alias scopes in the new SCoP.Johannes Doerfert2014-10-021-0/+7
| | | | | | | | | The command line flag -polly-annotate-alias-scopes controls whether or not Polly annotates alias scopes in the new SCoP (default ON). This can improve later optimizations as the new SCoP is basically an alias free environment for them. llvm-svn: 218877
* [RTC] Runtime Alias Checks for the ISL backendJohannes Doerfert2014-09-181-12/+5
| | | | | | | | | | | | | | | | | This change will build all alias groups (minimal/maximal accesses to possible aliasing base pointers) we have to check before we can assume an alias free environment. It will also use these to create Runtime Alias Checks (RTC) in the ISL code generation backend, thus allow us to optimize SCoPs despite possibly aliasing pointers when this backend is used. This feature will be enabled for the isl code generator, e.g., --polly-code-generator=isl, but disabled for: - The cloog code generator (still the default). - The case delinearization is enabled. - The case non-affine accesses are allowed. llvm-svn: 218046
* [Fix] Rewire the Region after a unconditional entry edge is createdJohannes Doerfert2014-09-151-11/+48
| | | | | | | | | | | | We use SplitEdge to split a conditional entry edge of the SCoP region. However, SplitEdge can cause two different situations (depending on whether or not the edge is critical). This patch tests which one is present and deals with the former unhandled one. It also refactors and unifies the case we have to change the basic blocks of the SCoP to new ones (see replaceScopAndRegionEntry). llvm-svn: 217802
* [Refactor] Cleanup isl code generationJohannes Doerfert2014-09-101-2/+14
| | | | | | | | | | | | | | | | | | | | Summary: + Refactor the runtime check (RTC) build function + Added helper function to create an PollyIRBuilder + Change the simplify region function to create not only unique entry and exit edges but also enfore that the entry edge is unconditional + Cleaned the IslCodeGeneration runOnScop function: - less post-creation changes of the created IR + Adjusted and added test cases Reviewers: grosser, sebpop, simbuerg, dpeixott Subscribers: llvm-commits, #polly Differential Revision: http://reviews.llvm.org/D5076 llvm-svn: 217508
* Revert "Added support for modulo expressions"Tobias Grosser2014-08-161-49/+4
| | | | | | | | | | | | This reverts commit 215684. The intention of the commit is great, but unfortunately it seems to be the cause of 14 LNT test suite failures: http://lab.llvm.org:8011/builders/perf-x86_64-penryn-O3-polly/builds/116 To make our buildbots and performance testers green until this issue is solved, we temporarily revert this commit. llvm-svn: 215816
* Added support for modulo expressionsJohannes Doerfert2014-08-151-4/+49
| | | | | | | | | | | The support is limited to signed modulo access and condition expressions with a constant right hand side, e.g., A[i % 2] or A[i % 9]. Test cases are modified according to this new feature and new test cases are added. Differential Revision: http://reviews.llvm.org/D4843 llvm-svn: 215684
* Fix formattingTobias Grosser2014-08-131-5/+5
| | | | llvm-svn: 215570
* [Polly] Remove the PoCC and ScopLib supportJohannes Doerfert2014-08-131-16/+1
| | | | | | | | | 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
* Make getIslCompatibleName globaly availableJohannes Doerfert2014-07-241-0/+28
| | | | llvm-svn: 213907
* Update for RegionInfo changes.Matt Arsenault2014-07-191-2/+2
| | | | | | | Mostly related to missing includes and renaming of the pass to RegionInfoPass. llvm-svn: 213457
* clang-format polly to avoid buildbot noiseTobias Grosser2014-07-091-30/+28
| | | | llvm-svn: 212609
* [C++11] Use more range based forsTobias Grosser2014-06-281-5/+5
| | | | llvm-svn: 211981
* Do not use namespace polly inside a header.Andreas Simbuerger2014-06-121-0/+1
| | | | | | | | | | | | | | | | In general this fixes ambiguity that can arise from using a different namespace that declares the same symbols as we do. One example inside llvm would be: createIndVarSimplifyPass(..); Which can be found in: llvm/Transforms/Scalar.h and polly/LinkAllPasses.h llvm-svn: 210755
* Fix typoAndreas Simbuerger2014-06-121-1/+1
| | | | llvm-svn: 210754
* [Modules] Fix potential ODR violations by sinking the DEBUG_TYPEChandler Carruth2014-04-222-6/+6
| | | | | | | | | | definition below all of the header #include lines, Polly edition. If you want to know more details about this, you can see the recent commits to Debug.h in LLVM. This is just the Polly segment of a cleanup I'm doing globally for this macro. llvm-svn: 206852
* Move Pass registration into polly libraryTobias Grosser2014-03-191-2/+42
| | | | | | | This ensures that the polly passes get properly registered both, when using polly as a loadable module and when directly linking it into clang/opt/bugpoint. llvm-svn: 204255
* (Make) Remove unused MakefilesAndreas Simbuerger2014-03-141-16/+0
| | | | llvm-svn: 203957
* Refactor Polly's Pass creation and initialization.Andreas Simbuerger2014-03-111-0/+289
| | | | | | Rename some files and adjust cmake accordingly llvm-svn: 203609
* [Modules] Update to reflect the move of CFG.h to the IR library in LLVMChandler Carruth2014-03-041-1/+1
| | | | | | r202827. llvm-svn: 202830
* cmake: build monolithic libLLVMPollyLib.dylibTobias Grosser2014-03-031-5/+0
| | | | | | | | | | The module LLVMPolly.so links to that. There is really no reason to build a large number of mini-libraries here, especially as we do have dependences between the libraries that are not properly handled and that make linking fail on darwin. Submitted-by: David Fang <fang@csl.cornell.edu> llvm-svn: 202743
* GMP is only required for CLooGSebastian Pop2014-02-221-40/+0
| | | | llvm-svn: 201925
* ScopValidator: smax expressions are no parametersTobias Grosser2013-12-091-1/+1
| | | | | | This fixes PR18155 which is a regression introduced in 152913. llvm-svn: 196827
* prepend LLVM to all Polly* libsSebastian Pop2013-11-161-1/+1
| | | | llvm-svn: 194923
* clang-format: No empty line after 'public:'Tobias Grosser2013-10-151-1/+0
| | | | llvm-svn: 192710
* ScopInfo: Split start value from SCEVAddRecExpr to enable parameter sharing.Tobias Grosser2013-08-051-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SCoP invariant parameters with the different start value would deter parameter sharing. For example, when compiling the following C code: void foo(float *input) { for (long j = 0; j < 8; j++) { // SCoP begin for (long i = 0; i < 8; i++) { float x = input[j * 64 + i + 1]; input[j * 64 + i] = x * x; } } } Polly would creat two parameters for these memory accesses: p_0: {0,+,256} p_2: {4,+,256} [j * 64 + i + 1] => MemRef_input[o0] : 4o0 = p_1 + 4i0 [j * 64 + i] => MemRef_input[o0] : 4o0 = p_0 + 4i0 These parameters only differ from start value. To enable parameter sharing, we split the start value from SCEVAddRecExpr, so they would share a single parameter that always has zero start value: p0: {0,+,256}<%for.cond1.preheader> [j * 64 + i + 1] => MemRef_input[o0] : 4o0 = 4 + p_1 + 4i0 [j * 64 + i] => MemRef_input[o0] : 4o0 = p_0 + 4i0 Such translation can make the polly-dependence much faster. Contributed-by: Star Tan <tanmx_star@yeah.net> llvm-svn: 187728
* Dependences: Use ostream printer to print analysis outputTobias Grosser2013-07-141-2/+0
| | | | llvm-svn: 186288
* Integrate latest clang-format changesTobias Grosser2013-06-232-6/+6
| | | | llvm-svn: 184655
* Use isl_val instead of isl_int in the core of PollyTobias Grosser2013-06-211-0/+47
| | | | | | | | | | | isl recently introduced isl_val as an abstract interface to represent arbitrary precision numbers. This interface superseeds the old isl_int interface. In contrast to the old interface which implemented arbitrary precision arithmetic using macros that forward to the gmp library, the new library hides the math library implementation in isl. This allows us to switch the math library used by isl without affecting users such as Polly. llvm-svn: 184529
* Correctly convert APInt to gmp valuesTobias Grosser2013-06-141-3/+2
| | | | | | | | | Previously this happend to work for integers up to i64, but we got it wrong for larger numbers. Fix this and add test cases to verify this keeps working. Reported by: Sven Verdoolaege <skimo at kotnet dot org> llvm-svn: 183986
* Sort includesTobias Grosser2013-05-072-6/+4
| | | | llvm-svn: 181297
* Reformat with clang-formatTobias Grosser2013-05-073-10/+11
| | | | | | | clang-format become way more stable. This time we mainly reformat function signatures. llvm-svn: 181294
* Support SCoPs with multiple entry edges.Tobias Grosser2013-04-161-0/+27
| | | | | | | | | | | | | | | | | | | | | 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
* SCEVValidator: Correctly store 'k * p' as a parameterTobias Grosser2013-04-141-1/+6
| | | | | | | | | | We do not only need to understand that 'k * p' is a parameter expression, but also need to store this expression in the set of parameters. Before this patch we wrongly stored the two individual parameters %k and %p. Reported by: Sebastian Pop <spop@codeaurora.org> llvm-svn: 179485
* ScopDetect: Allow multiplications of the form <param> * <param>Tobias Grosser2013-04-101-0/+5
| | | | | | | We handle these by treating this result of the multiplication as an additional parameter. llvm-svn: 179163
* clang-format: Many more filesTobias Grosser2013-03-232-20/+9
| | | | | | | | | | | | | After this commit, polly is clang-format clean. This can be tested with 'ninja polly-check-format'. Updates to clang-format may change this, but the differences will hopefully be both small and general improvements to the formatting. We currently have some not very nice formatting for a couple of items, DEBUG() stmts for example. I believe the benefit of being clang-format clean outweights the not perfect layout of this code. llvm-svn: 177796
* Remove dependence on canonical induction variableTobias Grosser2013-03-201-9/+0
| | | | | | | | When using the scev based code generation, we now do not rely on the presence of a canonical induction variable any more. This commit prepares the path to (conditionally) disable the induction variable canonicalization pass. llvm-svn: 177548
* Correct function to decide if a SCEV can be ignoredSebastian Pop2013-03-181-3/+107
| | | | | | | | | | | When doing SCEV based code generation, we ignore instructions calculating values that are fully defined by a SCEV expression. The values that are calculated by this instructions are recalculated on demand. This commit improves the check to verify if certain instructions can be ignored and recalculated on demand. llvm-svn: 177313
OpenPOWER on IntegriCloud