summaryrefslogtreecommitdiffstats
path: root/polly/lib/Support/SCEVAffinator.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Pass scope and LoopInfo to SCEVValidator. NFC.Michael Kruse2016-03-031-3/+4
| | | | | | | | The scope will be required in the following fix. This commit separates the large changes that do not change behaviour from the small, but functional change. llvm-svn: 262664
* Separate more constant factors of parametersJohannes Doerfert2016-02-141-15/+10
| | | | | | | | | | | | | | | | | So far we separated constant factors from multiplications, however, only when they are at the outermost level of a parameter SCEV. Now, we also separate constant factors from the parameter SCEV if the outermost expression is a SCEVAddRecExpr. With the changes to the SCEVAffinator we can now improve the extractConstantFactor(...) function at will without worrying about any other code part. Thus, if needed we can implement a more comprehensive extractConstantFactor(...) function that will traverse the SCEV instead of looking only at the outermost level. Four test cases were affected. One did not change much and the other three were simplified. llvm-svn: 260859
* Sort includes using Chandler's sort_includes.py scriptTobias Grosser2015-09-251-4/+2
| | | | llvm-svn: 248568
* Use <nsw> AddRecs in the affinator to avoid bounded assumptionsJohannes Doerfert2015-09-201-0/+14
| | | | | | | | If we encounter a <nsw> tagged AddRec for a loop we know the trip count of that loop has to be bounded or the semantics is undefined anyway. Hence, we only need to add unbounded assumptions if no such AddRec is known. llvm-svn: 248128
* Use modulo semantic to generate non-integer-overflow assumptionsJohannes Doerfert2015-09-151-4/+95
| | | | | | | | | | | | | | | | | | | | | | | | | This will allow to generate non-wrap assumptions for integer expressions that are part of the SCoP. We compare the common isl representation of the expression with one computed with modulo semantic. For all parameter combinations they are not equal we can have integer overflows. The nsw flags are respected when the modulo representation is computed, nuw and nw flags are ignored for now. In order to not increase compile time to much, the non-wrap assumptions are collected in a separate boundary context instead of the assumed context. This helps compile time as the boundary context can become complex and it is therefor not advised to use it in other operations except runtime check generation. However, the assumed context is e.g., used to tighten dependences. While the boundary context might help to tighten the assumed context it is doubtful that it will help in practice (it does not effect lnt much) as the boundary (or no-wrap assumptions) only restrict the very end of the possible value range of parameters. PET uses a different approach to compute the no-wrap context, though lnt runs have shown that this version performs slightly better for us. llvm-svn: 247732
* Use blocks instead of domains in SCEVAffinatorJohannes Doerfert2015-09-151-13/+11
| | | | | | | | Due to the new domain generation, the SCoP keeps track of the domain for all blocks, thus the SCEVAffinator can now work with blocks to avoid duplication of the domains. llvm-svn: 247731
* [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
* 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
OpenPOWER on IntegriCloud