summaryrefslogtreecommitdiffstats
path: root/polly/lib/Support/RegisterPasses.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* [GSoC 2016] New function pass DependenceInfoWrapperPassJohannes Doerfert2016-06-271-0/+1
| | | | | | | | | | | | | | This patch addresses: - A new function pass to compute polyhedral dependences. This is required to avoid the region pass manager. - Stores a map of Scop to Dependence object for all the scops present in a function. By default, access wise dependences are stored. Patch by Utpal Bora <cs14mtech11017@iith.ac.in> Differential Revision: http://reviews.llvm.org/D21105 llvm-svn: 273881
* [GSoC 2016]New function pass ScopInfoWrapperPassJohannes Doerfert2016-06-271-0/+1
| | | | | | | | | | | | This patch adds a new function pass ScopInfoWrapperPass so that the polyhedral description of a region, the SCoP, can be constructed and used in a function pass. Patch by Utpal Bora <cs14mtech11017@iith.ac.in> Differential Revision: http://reviews.llvm.org/D20962 llvm-svn: 273856
* clang-tidy: Add llvm namespace commentsTobias Grosser2016-06-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | llvm commonly adds a comment to the closing brace of a namespace to indicate which namespace is closed. clang-tidy provides with llvm-namespace-comment a handy tool to check for this habit. We use it to ensure we consitently use namespace comments in Polly. There are slightly different styles in how namespaces are closed in LLVM. As there is no large difference between the different comment styles we go for the style clang-tidy suggests by default. To reproduce this fix run: for i in `ls tools/polly/lib/*/*.cpp`; \ clang-tidy -checks='-*,llvm-namespace-comment' -p build $i -fix \ -header-filter=".*"; \ done This cleanup was suggested by Eugene Zelenko <eugene.zelenko@gmail.com> in http://reviews.llvm.org/D21488 and was split out to increase readability. llvm-svn: 273621
* Decouple SCoP building logic from passJohannes Doerfert2016-05-311-2/+2
| | | | | | | | | | | | | | | | Created a new pass ScopInfoRegionPass. As name suggests, it is a region pass and it is there to preserve compatibility with our existing Polly passes. ScopInfoRegionPass will return a SCoP object for a valid region while the creation of the SCoP stays in the ScopInfo class. Contributed-by: Utpal Bora <cs14mtech11017@iith.ac.in> Reviewed-by: Tobias Grosser <tobias@grosser.es>, Johannes Doerfert <doerfert@cs.uni-saarland.de> Differential Revision: http://reviews.llvm.org/D20770 llvm-svn: 271259
* Fix: Add pass manager barrier.Michael Kruse2016-03-021-0/+6
| | | | | | | | | | | The LNT test suite with -polly-process-unprofitable -polly-position=before-vectorizer currenty fails 59 tests. With this barrier added, only 16 keep failing. This is probably because Polly's code generation currently does not correctly preserve all analyses it promised to preserve. Temporarily add this barrier until further investigation. llvm-svn: 262488
* IR cleanup after CodeGenerationMichael Kruse2015-11-261-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | Re-run canonicalization passes after Polly's code generation. The set of passes currently added here are nearly all the passes between --polly-position=early and --polly-position=before-vectorizer, i.e. all passes that would usually run after Polly. In order to run these only if Polly actually modified the code, we add a function attribute "polly-optimzed" to a function that contains generated code. The cleanup pass is skipped if the function does not have this attribute. There is no support by the (legacy) PassManager to run passes only under some conditions. One could have wrapped all transformation passes to run only when CodeGeneration changed the code, but the analyses would run anyway. This patch creates an independent pass manager. The disadvantages are that all analyses have to re-run even if preserved and it does not honor compiler switches like the PassManagerBuilder does. Differential Revision: http://reviews.llvm.org/D14333 llvm-svn: 254150
* Remove independent blocks passJohannes Doerfert2015-10-181-1/+0
| | | | | | | | | | | Polly can now be used as a analysis only tool as long as the code generation is disabled. However, we do not have an alternative to the independent blocks pass in place yet, though in the relevant cases this does not seem to impact the performance much. Nevertheless, a virtual alternative that allows the same transformations without changing the input region will follow shortly. llvm-svn: 250652
* Use EP_ModuleOptimizerEarly to run early polly passes,Tobias Grosser2015-10-121-3/+3
| | | | | | | | instead of llvm::PassManagerBuilder::EP_EarlyAsPossible. This will allow us to run actual module passes in Polly's canonicalization sequence, but should otherwise have only little impact. llvm-svn: 250091
* Merge TempScopInfo into ScopInfoMichael Kruse2015-09-101-1/+0
| | | | | | | | | | | | | The TempScopInfo (-polly-analyze-ir) pass is removed and its work taken over by ScopInfo (-polly-scops). Several tests depend on -polly-analyze-ir and use -polly-scops instead which for the moment prints the output of both passes. This again is not expected by some other tests, especially those with negative searches, which have been adapted. Differential Version: http://reviews.llvm.org/D12694 llvm-svn: 247288
* Merge TempScopInfo.{cpp|h} into ScopInfo.{cpp|h}Michael Kruse2015-09-101-1/+0
| | | | | | | | | | | | | | | | | | This prepares for a series of patches that merges TempScopInfo into ScopInfo to reduce Polly's code complexity. Only ScopInfo.{cpp|h} will be left thereafter. Moving the code of TempScopInfo in one commit makes the mains diffs simpler to understand. In detail, merging the following classes is planned: TempScopInfo into ScopInfo TempScop into Scop IRAccess into MemoryAccess Only moving code, no functional changes intended. Differential Version: http://reviews.llvm.org/D12693 llvm-svn: 247274
* Fix typo: zycle -> cycle [NFC]Michael Kruse2015-09-091-1/+1
| | | | llvm-svn: 247172
* Run ScopInfo after the ScopViewersTobias Grosser2015-08-041-2/+2
| | | | | | | | | This change is required to see the detected scops even in cases where there is no other ScopInfo user after the ScopViewers. Before this change, when running with -polly-optimizer=none -polly-code-generator=none detected scops have not been shown. llvm-svn: 243971
* Always execute polly::CodePreparation before PollyMichael Kruse2015-07-231-0/+2
| | | | | | | ScopDetection does not allow scops to begin with the entry block, were allocas are added at code generation. llvm-svn: 243036
* Add option to choose where in the pass pipeline polly is runTobias Grosser2015-07-161-6/+70
| | | | | | | These options are useful to play with the location of Polly within LLVM's pass manager. llvm-svn: 242390
* Rename IslCodeGeneration to CodeGenerationTobias Grosser2015-05-121-2/+2
| | | | | | | | | Besides class, function and file names, we also change the command line option from -polly-codegen-isl to just -polly-codegen. The isl postfix is a leftover from the times when we still had the CLooG based -polly-codegen. Today it is just redundant and we drop it. llvm-svn: 237099
* Do not expose code generator choice in the headerTobias Grosser2015-04-271-5/+4
| | | | | | | There is no need for other passes to access the code-generator command-line option. Hence, drop it from the header to simplify the interface. llvm-svn: 235866
* Remove flag '-polly-annotate-alias-scopes'Tobias Grosser2015-04-271-7/+0
| | | | | | | | This option is enabled since a long time and there does not seem to be a situation in which we would not want to print alias scopes. Remove this option to reduce the set of command-line option combinations that may expose bugs. llvm-svn: 235861
* Drop libpluto supportTobias Grosser2015-03-301-21/+3
| | | | | | | | 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
* Add option to only run scop detectionTobias Grosser2015-03-301-0/+10
| | | | llvm-svn: 233556
* Drop -polly-vectorizer-unroll-only optionTobias Grosser2015-03-231-2/+0
| | | | | | | | This options was earlier used for experiments with the vectorizer, but to my knowledge is not really used anymore. If anybody needs this, we can always reintroduce this feature. llvm-svn: 232934
* Add -polly-vectorizer=stripmineTobias Grosser2015-03-121-6/+9
| | | | | | | By strip-mining outer loops to the innermost level we can enable LLVM's loop vectorizer to vectorize outer loops. llvm-svn: 232100
* Drop option to prepare code for the BB vectorizerTobias Grosser2015-03-121-2/+0
| | | | | | | | The BB vectorizer is deprecated and there is no point in generating code for it any more. This option was introduced when there was not yet any loop vectorizer in sight. Now being matured, Polly should target the loop vectorizer. llvm-svn: 232099
* Rename the Dependences pass to DependenceInfo [NFC]Johannes Doerfert2015-03-041-2/+2
| | | | | | | | | | 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
* [PM] Convert Polly over to directly use the legacy pass managerChandler Carruth2015-02-131-3/+3
| | | | | | | | | 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
* 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
* 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
* 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 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
* clang-format polly to avoid buildbot noiseTobias Grosser2014-07-091-30/+28
| | | | llvm-svn: 212609
* 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
* 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
* Refactor Polly's Pass creation and initialization.Andreas Simbuerger2014-03-111-0/+289
Rename some files and adjust cmake accordingly llvm-svn: 203609
OpenPOWER on IntegriCloud