summaryrefslogtreecommitdiffstats
path: root/polly/lib
Commit message (Collapse)AuthorAgeFilesLines
* [JSONExporter] Try to appease buildbot. NFC.Michael Kruse2018-08-011-1/+1
| | | | | | | The compiler does not seem to able move a local variable in the function's return statement. llvm-svn: 338466
* [Polly-ACC] Fix compilation after r338450. NFC.Michael Kruse2018-08-011-1/+1
| | | | llvm-svn: 338462
* [JSONExporter] Replace bundled Jsoncpp with llvm/Support/JSON.h. NFC.Michael Kruse2018-08-0119-6592/+80
| | | | | | Differential Revision: https://reviews.llvm.org/D49950 llvm-svn: 338461
* [CodeGen] Convert IslNodeBuilder::getNumberOfIterations to isl++. NFC.Michael Kruse2018-07-311-30/+18
| | | | llvm-svn: 338451
* [CodeGen] Convert IslNodeBuilder::createForSequential to isl++. NFC.Michael Kruse2018-07-311-25/+17
| | | | llvm-svn: 338450
* [CodeGen] Convert IslNodeBuilder::getUpperBound to isl++. NFC.Michael Kruse2018-07-311-30/+17
| | | | llvm-svn: 338449
* [DependenceInfo] Use isl++ to replace foreach_set with for loopTobias Grosser2018-07-171-9/+13
| | | | llvm-svn: 337248
* [IslNodeBuilder] Use isl++ to replace foreach_set with for loopTobias Grosser2018-07-171-14/+13
| | | | llvm-svn: 337247
* [ScopInfo] Replace isl foreach calls with for loopsTobias Grosser2018-07-171-9/+16
| | | | llvm-svn: 337246
* [ZoneAlgo] Replace isl foreach calls with for loopsTobias Grosser2018-07-171-9/+6
| | | | llvm-svn: 337245
* [FlattenSchedule] Replace isl foreach calls with for loopsTobias Grosser2018-07-171-3/+2
| | | | llvm-svn: 337244
* [MaximalStaticExpansion] Replace isl foreach calls with for loopsTobias Grosser2018-07-171-11/+6
| | | | llvm-svn: 337243
* [ForwardOpTree] Replace isl foreach calls with for loopsTobias Grosser2018-07-171-5/+5
| | | | llvm-svn: 337242
* [Simplify] Replace isl foreach calls with for loopsTobias Grosser2018-07-171-27/+22
| | | | llvm-svn: 337241
* [FlattenAlgo] Replace more isl foreach calls with for loopsTobias Grosser2018-07-171-8/+7
| | | | | | | | | | This time we replace for loops where the return isl::stat::error has been used to carry status information. There are still two uses of foreach remaining as we do not have a corresponding for implementation for pw_aff functions. llvm-svn: 337239
* [FlattenAlgo] Replace some isl foreach calls with for loopsTobias Grosser2018-07-171-11/+7
| | | | | | Replace foreach calls which only return 'ok' with for loops. llvm-svn: 337238
* [ScopInfo] Replace isl foreach calls with for loopsTobias Grosser2018-07-161-18/+6
| | | | | | | | After Philip added support for range-based for loops to our C++ bindings, we now convert another bunch of foreach calls to range-for loops. This improves general readability of the code. llvm-svn: 337201
* [Polly][isl] Add neutrally-named accessors to isl list elements and sizesPhilip Pfaffe2018-07-131-0/+84
| | | | | | | | | | | | | | Summary: This could simplify the isl iterator implementation a lot. Reviewers: grosser, Meinersbur, bollu Reviewed By: grosser Subscribers: pollydev, llvm-commits Differential Revision: https://reviews.llvm.org/D49019 llvm-svn: 337054
* Add a file that was missing in r336425Philip Pfaffe2018-07-061-0/+513
| | | | llvm-svn: 336430
* Update isl to isl-0.19-224-gce84a511Tobias Grosser2018-07-0624-640/+424
| | | | | | | | This is a maintenance update. Besides many minor changes it ships two functions "isl_*_list_size" and "isl_*_list_get_at" which will allow us to simplify the iterator implementation in Polly. llvm-svn: 336425
* [ScopInfo] Move foldSizeConstantsToRight() to isl++Tobias Grosser2018-07-051-61/+30
| | | | | | | | | | | | | | Summary: This patch updates the isl interface used in `foldSizeConstantsToRight()` to the new C++ interface. Reviewers: chelini, grosser, philip.pfaffe, Meinersbur Reviewed By: grosser Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D48965 llvm-svn: 336362
* [CodeGen] Fix potential null pointer dereference. NFC.Michael Kruse2018-07-051-3/+5
| | | | | | | | | | ScalarEvolution::getSCEV dereferences its argument, s.t. passing nullptr leads to undefined behaviour. Check for nullptr before calling it instead of checking its argument afterwards. llvm-svn: 336350
* [PPCGCodeGen] Change printf to outs() to prevent garbled output. [NFC]Siddharth Bhat2018-07-041-8/+8
| | | | | | | | | | | | | | | | | Summary: It appears that llvm uses unbuffered C++ streams. So, we should not mix C and C++ stream operations, because that will give us mixed up output. Reviewers: efriedma, jdoerfert, Meinersbur, gareevroman, sebpop, zinob, huihuiz, pollydev, grosser, singam-sanjay, philip.pfaffe Reviewed By: philip.pfaffe Subscribers: nemanjai, kbarton Differential Revision: https://reviews.llvm.org/D40126 llvm-svn: 336288
* ScopInfo: simplify equivalence classes before storing them [NFCI]Tobias Grosser2018-07-041-0/+2
| | | | | | | | | This change has no impact on upstream Polly directly, but reduces output noise for some internal isl versions we are testing. In general, storing simpler and more canonical output is a good idea. Hence, it seems useful to upstream this change. llvm-svn: 336281
* [Polly-ACC] Add isl_space.h to gpu_tree.cSiddharth Bhat2018-07-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds <isl_space.h> to gpu_tree.c. This prevents a segfault when allocating a new isl_space in the function create_sync_domain(), as the compiler now knows that the return type is a pointer instead of assuming the function returns an int. This has been updated in upstream PPCG, so we should bump up our PPCG version. Initially discovered by Philip Pfaffe in Polly. Reviewers: grosser, bollu, philip.pfaffe Reviewed By: bollu Subscribers: nemanjai, kbarton, llvm-commits Differential Revision: https://reviews.llvm.org/D48883 Contributed-by: Alain Denzler <alaindenzler@gmail.com> llvm-svn: 336251
* [polly-acc] change cl_get_* return types to 32/64bitPhilip Pfaffe2018-07-021-9/+17
| | | | | | | | | | | | | | | | | | | Summary: This patch changes the return types for ocl_get_* functions during SPIR code generation. Because these functions return size_t types, the return type needs to be changed to the actual size of size_t on the device. Based on work by Michal Babej and Pekka Jääskeläinen Patch by: Alain Denzler Reviewers: grosser, philip.pfaffe, bollu Reviewed By: grosser, philip.pfaffe Subscribers: nemanjai, kbarton, llvm-commits Differential Revision: https://reviews.llvm.org/D48774 llvm-svn: 336080
* Use range for in normalizeValInst [NFCI]Tobias Grosser2018-06-291-27/+25
| | | | llvm-svn: 335971
* Translate a couple of foreach callbacks into range-based iterator loopsTobias Grosser2018-06-291-38/+25
| | | | | | | Thanks to Philip Pfaffe for providing iterator support in the previous commit. llvm-svn: 335970
* [ScopHelper] Provide support for recognising collective invariant loadsPhilip Pfaffe2018-06-292-13/+63
| | | | | | | | | | | | | | Summary: This patch aims to provide support for detecting load patterns which are collectively invariant but right now `isHoistableLoad()` is checking each load instruction individually which cannot detect the load pattern as a whole. Patch by: Sahil Girish Yerawar Reviewers: bollu, philip.pfaffe, Meinersbur Reviewed By: philip.pfaffe, Meinersbur Differential Revision: https://reviews.llvm.org/D48026 llvm-svn: 335949
* [ScopHelper] Cache ScopExpander results.Eli Friedman2018-06-271-0/+12
| | | | | | | | | | | | | | | | | | | The number of SCEV expressions is usually linear in the number of IR instructions being modeled. However, a naive SCEV visitor is not. For an expression like x*x, "x" will be visited twice. If x is itself an expression like x*x, that will be visited twice, etc, and the overall runtime is O(2^N) in the number of SCEV expressions. To prevent this from happening, add a cache, so we only visit each SCEV expression once. Not sure this is the best solution. Maybe we can instead check whether the SCEV is scop-invariant (in which case we never need to map the value). But we don't have a utility for that at the moment. Differential Revision: https://reviews.llvm.org/D47087 llvm-svn: 335783
* [ZoneAlgo] Use getDefToTarget in makeValInst. NFC.Michael Kruse2018-06-262-115/+85
| | | | | | | | | | | | Move the optimized getDefToTarget() from ForwardOpTree to ZoneAlgo such that it can be used by makeValInst. This reduces the compile time of GrTestUtils of the aosp buildbot from 2m46s to 21s, which should fix the timeout issue. Differential Revision: https://reviews.llvm.org/D48579 llvm-svn: 335606
* Move ScopInfo to isl++Tobias Grosser2018-06-191-2/+1
| | | | llvm-svn: 335029
* Adjust for clang-format changesTobias Grosser2018-06-181-6/+6
| | | | llvm-svn: 334941
* [ScopInfo] Move splitAliasGroupsByDomain and getAccessDomain to isl++ [NFCI]Tobias Grosser2018-06-181-10/+8
| | | | llvm-svn: 334940
* [ScopInfo] Move more functions to isl++ [NFCI]Tobias Grosser2018-06-181-24/+17
| | | | | | | | | | | This change includes: - getFortranArrayIds - adjustDomainDimensions - propagateInvalidStmtDomains - buildAliasGroupsForAccesses llvm-svn: 334939
* [ScopInfo] Move addNonEmptyDomainConstraints to isl++ [NFCI]Tobias Grosser2018-06-181-2/+2
| | | | llvm-svn: 334938
* Move buildConditionSet to C++Tobias Grosser2018-06-181-16/+21
| | | | llvm-svn: 334937
* Simplify the implementation of getCUDALibDeviceFunction. NFC.Philip Pfaffe2018-06-141-13/+9
| | | | | | | | | | | | | | | | Summary: The function is currently awfully complicated. Drop the IILE and use StringRef over std::string. Reviewers: Meinersbur, grosser, bollu Reviewed By: Meinersbur Subscribers: nemanjai, kbarton, bollu, llvm-commits, pollydev Differential Revision: https://reviews.llvm.org/D48070 llvm-svn: 334695
* Drop unnecessary whitespace [NFCI]Tobias Grosser2018-06-111-2/+2
| | | | llvm-svn: 334413
* [ScopBuilder] Slightly improve code structure [NFCI]Tobias Grosser2018-06-111-1/+2
| | | | | | | | First build the surrounding loops and then build up the polyhedral structures. Before r326664 we had to mix these updates, clean this up to improve readability (slightly). llvm-svn: 334412
* Update isl to isl-0.19-185-g8e9f55ceTobias Grosser2018-06-1126-85/+733
| | | | | | This is mainly a maintenance update. llvm-svn: 334406
* Run clang-formatPhilip Pfaffe2018-06-071-1/+1
| | | | llvm-svn: 334172
* Fix a missing lambda return type that tripped the buildersPhilip Pfaffe2018-06-071-1/+1
| | | | llvm-svn: 334166
* [OpTree] Introduce shortcut for computing the def->target mapping. NFCI.Michael Kruse2018-06-062-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | In case the schedule has not changed and the operand tree root uses a value defined in an ancestor loop, the def-to-target mapping is trivial. For instance, the SCoP for (int i < 0; i < N; i+=1) { DefStmt: D = ...; for (int j < 0; j < N; j+=1) { TargetStmt: use(D); } } has DefStmt-to-TargetStmt mapping of { DefStmt[i] -> TargetStmt[i,j] } This should apply on the majority of def-to-target mappings. This patch detects this case and directly constructs the expected mapping. It assumes that the mapping never crosses the loop header DefStmt is in, which ForwardOpTree does not support at the moment anyway. Differential Revision: https://reviews.llvm.org/D47752 llvm-svn: 334134
* getDependences to new C++ interfaceTobias Grosser2018-06-066-23/+30
| | | | | | | | | | | | | | Reviewers: Meinersbur, grosser, bollu, cs15btech11044, jdoerfert Reviewed By: grosser Subscribers: pollydev, llvm-commits Tags: #polly Differential Revision: https://reviews.llvm.org/D47786 llvm-svn: 334092
* Fix formattingTobias Grosser2018-06-051-1/+1
| | | | llvm-svn: 333988
* Update for a header file move in LLVMDavid Blaikie2018-06-042-2/+2
| | | | llvm-svn: 333956
* partitionSetParts from C to C++ interface.Tobias Grosser2018-06-011-41/+32
| | | | | | | | | | | | | | | | Summary: partitionSetParts from C to new C++ interface. Reviewers: grosser, Meinersbur, jdoerfert, bollu, cs15btech11044 Reviewed By: grosser, Meinersbur Subscribers: llvm-commits, pollydev Tags: #polly Differential Revision: https://reviews.llvm.org/D47252 llvm-svn: 333780
* [ZoneAlgo] Make ZoneAlgorithm::isNormalized out-of-quota safe.Michael Kruse2018-05-312-12/+21
| | | | | | | | | | | | | | | The aosp-O3-polly-before-vectorizer-unprofitable buildbot currently fails in ZoneAlgorithm::isNormalized, presumably because an out-of-quota happens in that function. Modify ZoneAlgorithm::isNormalized to return an isl::boolean such it can report an error. In the failing case, it was called in an assertion in ForwardOpTree. Allow to pass the assertion in an out-of-quota event, a condition that is later checked before forwarding an operand tree. llvm-svn: 333709
* Update isl C++ bindingsTobias Grosser2018-05-311-0/+1267
| | | | | | | | | | | | | This update adds new list types and adds functions which convert isl data types to lists of their contained elements: isl::set::get_basic_set_list isl::union_set::get_set_list isl::map::get_basic_map_list isl::union_map::get_map_list llvm-svn: 333688
OpenPOWER on IntegriCloud