summaryrefslogtreecommitdiffstats
path: root/polly/lib/Support
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Disable support for modulo expressionsJohannes Doerfert2015-09-101-11/+17
| | | | | | | | | The support for modulo expressions is not comlete and makes the new domain generation harder. As the currently broken domain generation needs to be replaced, we will first swap in the new, fixed domain generation and make it compatible with the modulo expressions later. llvm-svn: 247278
* 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
* Disable support for pointer expressionsJohannes Doerfert2015-09-091-2/+10
| | | | | | | | The support for pointer expressions is broken as it can only handle some patterns in the IslExprBuilder. We should to treat pointers in expressions the same as integers at some point and revert this patch. llvm-svn: 247147
* [FIX] Keep a copy of the Domain set in the SCEVAffinatorJohannes Doerfert2015-08-301-4/+7
| | | | llvm-svn: 246397
* [NFC] Make SCEVAffinator work without a statementJohannes Doerfert2015-08-281-5/+5
| | | | llvm-svn: 246290
* Use ISL to Determine Loop Trip CountJohannes Doerfert2015-08-271-7/+1
| | | | | | | | | | | Use ISL to compute the loop trip count when scalar evolution is unable to do so. Contributed-by: Matthew Simpson <mssimpso@codeaurora.org> Differential Revision: http://reviews.llvm.org/D9444 llvm-svn: 246142
* Introduce the ScopExpander as a SCEVExpander replacementJohannes Doerfert2015-08-181-0/+109
| | | | | | | | | | | | | | | The SCEVExpander cannot deal with all SCEVs Polly allows in all kinds of expressions. To this end we introduce a ScopExpander that handles the additional expressions separatly and falls back to the SCEVExpander for everything else. Reviewers: grosser, Meinersbur Subscribers: #polly Differential Revision: http://reviews.llvm.org/D12066 llvm-svn: 245288
* Make the dimension sizes of in ScopArrayInfo available as isl_pw_affsTobias Grosser2015-08-121-1/+5
| | | | | | This makes it easier to reason about the size of an array dimension with isl. llvm-svn: 244757
* Remove identity operation from SCEVAffinatorJohannes Doerfert2015-08-121-2/+1
| | | | llvm-svn: 244736
* Add caching to the SCEVAffinatorJohannes Doerfert2015-08-121-2/+19
| | | | | | | | | | | | | | | | While the compile time is not affected by this patch much it will allow us to look at all translated expressions after the SCoP is build in a convenient way. Additionally, bigger SCoPs or SCoPs with repeating complicated expressions might benefit from the cache later on. Reviewers: grosser, Meinersbur Subscribers: #polly Differential Revision: http://reviews.llvm.org/D11975 llvm-svn: 244734
* Expose the SCEVAffinator and make it a member of a SCoP.Johannes Doerfert2015-08-121-0/+236
| | | | | | | | | | | This change has three major advantages: - The ScopInfo becomes smaller. - It allows to use the SCEVAffinator from outside the ScopInfo. - A member object allows state which in turn allows e.g., caching. Differential Revision: http://reviews.llvm.org/D9099 llvm-svn: 244730
* Revise the simplification of regionsMichael Kruse2015-08-111-79/+113
| | | | | | | | | | | | | | | | | | | | The previous code had several problems: For newly created BasicBlocks it did not (always) call RegionInfo::setRegionFor in order to update its analysis. At the moment RegionInfo does not verify its BBMap, but will in the future. This is fixed by determining the region new BBs belong to and set it accordingly. The new executeScopConditionally() requires accurate getRegionFor information. Which block is created by SplitEdge depends on the incoming and outgoing edges of the blocks it connects, which makes handling its output more difficult than it needs to be. Especially for finding which block has been created an to assign a region to it for the setRegionFor problem above. This patch uses an implementation for splitEdge that always creates a block between the predecessor and successor. simplifyRegion has also been simplified by using SplitBlockPredecessors instead of SplitEdge. Isolating the entries and exits have been refectored into individual functions. Previously simplifyRegion did more than just ensuring that there is only one entering and one exiting edge. It ensured that the entering block had no other outgoing edge which was necessary for executeScopConditionally(). Now the latter uses the alternative splitEdge implementation which can handle this situation so simplifyRegion really only needs to simplify the region. Also, executeScopConditionally assumed that there can be no PHI nodes in blocks with one incoming edge. This is wrong and LCSSA deliberately produces such edges. However, previous passes ensured that there can be no such PHIs in exit nodes, but which will no longer hold in the future. The new code that the property that it preserves the identity of region block (the property that the memory address of the BasicBlock containing the instructions remains the same; new blocks only contain PHI nodes and a terminator), especially the entry block. As a result, there is no need to update the reference to the BasicBlock of ScopStmt that contain its instructions because they have been moved to other basic blocks. Reviewers: grosser Part of Differential Revision: http://reviews.llvm.org/D11867 llvm-svn: 244606
* Introduce splitBlock and use it in splitEntryBlockForAllocaMichael Kruse2015-08-111-4/+36
| | | | | | | | | | | | | | RegionInfo::splitBlock did not update RegionInfo correctly. Specifically, it tried to make the new block the entry block if possible. This breaks for nested regions that have edges to the old block. We simply do not change the entry block. Updating RegionInfo becomes trivial as both block will always be in the same region. splitEntryBlockForAlloca makes use of the new splitBlock. Reviewers: grosser Part of Differential Revision: http://reviews.llvm.org/D11867 llvm-svn: 244600
* 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
* Use the branch instruction to define the location of a PHI-node writeTobias Grosser2015-08-021-8/+0
| | | | | | | | | | | | | | | | | | | We use the branch instruction as the location at which a PHI-node write takes place, instead of the PHI-node itself. This allows us to identify the basic-block in a region statement which is on the incoming edge of the PHI-node and for which the write access was originally introduced. As a result we can, during code generation, avoid generating PHI-node write accesses for basic blocks that do not preceed the PHI node without having to look at the IR again. This change fixes a bug which was introduced in r243420, when we started to explicitly model PHI-node reads and writes, but dropped some additional checks that where still necessary during code generation to not emit PHI-node writes for basic-blocks that are not on incoming edges of the original PHI node. Compared to the code before r243420 the new code does not need to inspect the IR any more and we also do not generate multiple redundant writes. llvm-svn: 243852
* 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
* [PM/AA] Update to reflect the new LLVM API which no longer requires anChandler Carruth2015-07-221-2/+1
| | | | | | AliasAnalysis pointer. llvm-svn: 242897
* 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
* Make non-affine statement names isl compatibleTobias Grosser2015-07-091-0/+2
| | | | | | | | | Named isl sets can generally have any name if they remain within Polly, but only certain strings can be parsed by isl. The new names we create ensure that we can always copy-past isl strings from Polly to other isl tools, e.g. for debugging. llvm-svn: 241787
* Add support for srem instructionTobias Grosser2015-06-241-0/+16
| | | | | | | | | | | Remainder operations with constant divisor can be modeled as quasi-affine expression. This patch adds support for detecting and modeling them. We also add a test that ensures they are correctly code generated. This patch was extracted from a larger patch contributed by Johannes Doerfert in http://reviews.llvm.org/D5293 llvm-svn: 240518
* 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
* Sort include directivesTobias Grosser2015-05-092-4/+2
| | | | | | | | | | 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
* [FIX] Invalid recognition of multidimensional accessJohannes Doerfert2015-05-031-0/+1
| | | | | | | | In the lnt benchmark MultiSource/Benchmarks/MallocBench/gs/gs with scalar and PHI modeling we detected the multidimensional accesses with sizes variant in the SCoP. This will check the sizes for validity. llvm-svn: 236395
* Adding debug location information to Polly's JSCOP and dot exportsTobias Grosser2015-05-031-0/+47
| | | | | | | | | | | | | | | | | | | | This change adds location information for the detected regions in Polly when the required debug information is available. The JSCOP output format is extended with a "location" field which contains the information in the format "source.c:start-end" The dot output is extended to contain the location information for each nested region in the analyzed function. As part of this change, the existing getDebugLocation function has been moved into lib/Support/ScopLocation.cpp to avoid having to include polly/ScopDetectionDiagnostics.h. Differential Revision: http://reviews.llvm.org/D9431 Contributed-by: Roal Jordans <r.jordans@tue.nl> llvm-svn: 236393
* 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
* Use the original no-wrap flags for normalized AddRecsJohannes Doerfert2015-04-261-1/+1
| | | | llvm-svn: 235822
* Do not assume all multi-parameter products are affineTobias Grosser2015-04-051-1/+1
| | | | | | | | | | As soon as one operand of the product is invalid, the entire product is invalid. This happens for example if one of the operands is not loop-invariant. This fixes http://llvm.org/PR23125 Reported-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com llvm-svn: 234119
* 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
* Strip constant factors from SCoP parametersJohannes Doerfert2015-03-291-0/+19
| | | | | | | | This will strip the constant factor of a parameter befor we add it to the SCoP. As a result the access functions are simplified, e.g., for the attached test case. llvm-svn: 233501
* 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
* Change argument "class" keyword to "const"Johannes Doerfert2015-02-261-2/+2
| | | | llvm-svn: 230666
* Fix formattingTobias Grosser2015-02-251-1/+1
| | | | llvm-svn: 230504
* [FIX] Silence warningJohannes Doerfert2015-02-241-0/+1
| | | | llvm-svn: 230336
* [FIX] Create single exiting blockJohannes Doerfert2015-02-241-4/+3
| | | | llvm-svn: 230326
* Fix formattingTobias Grosser2015-02-191-1/+2
| | | | llvm-svn: 229920
* [NFC] Generalize getIslCompatibleName interface.Johannes Doerfert2015-02-191-5/+11
| | | | llvm-svn: 229877
* [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
* [FIX] Correctly handle scalar dependences of branch instructionsJohannes Doerfert2015-02-111-0/+2
| | | | llvm-svn: 228866
* Allow signed devision in access functionsJohannes Doerfert2015-02-111-7/+33
| | | | llvm-svn: 228833
* [FIX] Activated a pointer test and removed obsolete commentJohannes Doerfert2015-01-301-7/+0
| | | | llvm-svn: 227524
* [PM] Update Polly for LLVM r226459 which removed another pass argumentChandler Carruth2015-01-191-6/+6
| | | | | | from an API in the process of preparing for the new pass manager. llvm-svn: 226460
* [PM] Update Polly for LLVM r226394 and r226396 which changed some of theChandler Carruth2015-01-181-3/+20
| | | | | | | block splitting interfaces to accept specific analyses rather than a pass. llvm-svn: 226398
* Add support for pointer types in expressionsTobias Grosser2015-01-081-2/+2
| | | | llvm-svn: 225464
OpenPOWER on IntegriCloud