summaryrefslogtreecommitdiffstats
path: root/polly/lib/Transform/ZoneAlgo.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [ZoneAlgo] Fix PHI inconsistency in invalid contexts.Michael Kruse2019-05-101-0/+5
| | | | | | | | | | PHI nodes (reads) could point to multiple instances of predecessor blocks (PHI writes) when in an invalid context. Fix by removing PHI instances that are in an invalid or ouside assumed context. This fixes llvm.org/PR41656. llvm-svn: 360454
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* [ZoneAlgo] Replace isl foreach calls with for loopsTobias Grosser2018-07-171-9/+6
| | | | llvm-svn: 337245
* Use range for in normalizeValInst [NFCI]Tobias Grosser2018-06-291-27/+25
| | | | llvm-svn: 335971
* [ZoneAlgo] Use getDefToTarget in makeValInst. NFC.Michael Kruse2018-06-261-10/+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
* [ZoneAlgo] Make ZoneAlgorithm::isNormalized out-of-quota safe.Michael Kruse2018-05-311-11/+19
| | | | | | | | | | | | | | | 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
* [polly] Update uses of DEBUG macro to LLVM_DEBUG.Nicola Zaghen2018-05-151-3/+4
| | | | | | | | | | | The DEBUG() macro is very generic so it might clash with other projects. The renaming was done as follows: - git grep -l 'DEBUG' | xargs sed -i 's/\bDEBUG\s\?(/LLVM_DEBUG(/g' - git diff -U0 master | ../clang/tools/clang-format/clang-format-diff.py -i -p1 -style LLVM Differential Revision: https://reviews.llvm.org/D44978 llvm-svn: 332352
* Remove the last uses of isl::give and isl::takeTobias Grosser2018-04-291-8/+6
| | | | llvm-svn: 331126
* [ZoneAlgo] Remove uses of isl::give - IITobias Grosser2018-04-281-13/+8
| | | | llvm-svn: 331121
* [ZoneAlgo] Remove uses of isl::giveTobias Grosser2018-04-281-41/+33
| | | | | | This moves more of Polly to islpp. llvm-svn: 331120
* [NFC] Make r318597 compatible with clang-formatZhaoshi Zheng2017-11-171-1/+1
| | | | llvm-svn: 318561
* [nfc] Iwyu: forward-declare/include raw_ostream in zone algoPhilip Pfaffe2017-11-171-0/+1
| | | | llvm-svn: 318517
* [ZoneAlgo/ForwardOpTree] Normalize PHIs to their known incoming values.Michael Kruse2017-10-311-6/+296
| | | | | | | | | | | | | | | | | | | | | | | Represent PHIs by their incoming values instead of an opaque value of themselves. This allows ForwardOpTree to "look through" the PHIs and forward the incoming values since forwardings PHIs is currently not supported. This is particularly useful to cope with PHIs inserted by GVN LoadPRE. The incoming values all resolve to a load from a single array element which then can be forwarded. It should in theory also reduce spurious conflicts in value mapping (DeLICM), but I have not yet found a profitable case yet, so it is not included here. To avoid transitive closure and potentially necessary overapproximations of those, PHIs that may reference themselves are excluded from normalization and keep their opaque self-representation. Differential Revision: https://reviews.llvm.org/D39333 llvm-svn: 317008
* [DeLICM] Fix wrong assumed access execution order.Michael Kruse2017-10-311-1/+1
| | | | | | | | | | | | | | ForwardOpTree may already transform a scalar access to an array accesses. The access remains implicit (isOriginalScalarKind(), meaning that the access is always executed at the begin/end of a statement), but targets an array (isLatestArrayKind(), which is unrelated to whether the execution is implicit/explicit). Fix by properly using isOriginalXXX() to determine execution order. This fixes the buildbots on MultiSource/Benchmarks/DOE-ProxyApps-C/miniGMG. llvm-svn: 316995
* [ZoneAlgo] Translate addArrayWriteAccess to isl++. NFC.Michael Kruse2017-10-241-11/+7
| | | | llvm-svn: 316459
* [ForwardOpTree] Test the max operations quota.Michael Kruse2017-09-181-1/+1
| | | | | | | | | | | | cl::opt<unsigned long> is not specialized and hence the option -polly-optree-max-ops impossible to use. Replace by supported option cl::opt<unsigned>. Also check for an error state when computing the written value, which happens when the quota runs out. llvm-svn: 313546
* Fix some unused warnings in pollyReid Kleckner2017-09-071-12/+0
| | | | llvm-svn: 312755
* [ZoneAlgo] Handle non-StoreInst/LoadInst MemoryAccesses including memset.Michael Kruse2017-09-061-17/+34
| | | | | | | | | | | Up to now ZoneAlgo considered array elements access by something else than a LoadInst or StoreInst as not analyzable. This patch removes that restriction by using the unknown ValInst to describe the written content, repectively the element type's null value in case of memset. Differential Revision: https://reviews.llvm.org/D37362 llvm-svn: 312630
* [ZoneAlgo] More fine-grained bail-out.Michael Kruse2017-08-281-16/+50
| | | | | | | | | | | | | | | | | | | | | ZoneAlgo used to bail out for the complete SCoP if it encountered something violating its assumption. This meant the neither OpTree can forward any load nor DeLICM do anything in such cases, even if their transformations are unrelated to the violations. This patch adds a list of compatible elements (currently with the granularity of entire arrays) that can be used for analysis. OpTree and DeLICM can then check whether their transformations only concern compatible elements, and skip non-compatible ones. This will be useful for e.g. Polybench's benchmarks covariance, correlation, bicg, doitgen, durbin, gramschmidt, adi that have assumption violation, but which are not necessarily relevant for all transformations. Differential Revision: https://reviews.llvm.org/D37219 llvm-svn: 311929
* [ZoneAlgo] Print rejection reasons to llvm::dbgs(). NFC.Michael Kruse2017-08-281-0/+3
| | | | llvm-svn: 311885
* test/GPGPU/invalid-kernel-assert-verifymodule.ll also requires assertionsTobias Grosser2017-08-221-1/+0
| | | | llvm-svn: 311423
* [ZoneAlgorithm] Move computeScalarReachingDefinition to c++Tobias Grosser2017-08-211-10/+7
| | | | llvm-svn: 311336
* [ISLTools/ZoneAlgo] Make distributeDomain and filterKnownValInst ↵Michael Kruse2017-08-091-1/+3
| | | | | | | | | | | | | | | isl_error_quota proof. distributeDomain() and filterKnownValInst() are used in a scop of ForwardOpTree that limits the number of isl operations. Therefore some isl functions may return null after any operation. Remove assertion that assume non-null results and handle isl_*_foreach returning isl::stat::error. I hope this fixes the crash of the asop buildbot at ihevc_recon.c. llvm-svn: 310461
* [ZoneAlgo] Add motivation for exception. NFC.Michael Kruse2017-08-091-0/+20
| | | | | Suggested-by: Hongbin Zheng <etherzhhb@gmail.com> llvm-svn: 310455
* [ZoneAlgo] Consolditate condition. NFC.Michael Kruse2017-08-091-8/+7
| | | | | | | No need to create an OptimizationRemarkMissed object if we are not going to use it anyway. llvm-svn: 310454
* [DeLICM/ZoneAlgo] Remove duplicate code. NFC.Michael Kruse2017-08-081-6/+1
| | | | | | | | DeLICM and ZoneAlgo both implemented filterKnownValInst. Declare ZoneAlgo's version in the header and let DeLCIM use it. llvm-svn: 310381
* [ZoneAlgo] Allow two writes that write identical values into same array slotTobias Grosser2017-08-071-5/+30
| | | | | | | | | Two write statements which write into the very same array slot generally are conflicting. However, in case the value that is written is identical, this does not cause any problem. Hence, allow such write pairs in this specific situation. llvm-svn: 310311
* [ForwardOpTree] Use known array content analysis to forward load instructions.Michael Kruse2017-08-071-1/+117
| | | | | | | | | | | | | | | | | This is an addition to the -polly-optree pass that reuses the array content analysis from DeLICM to find array elements that contain the same value as the value loaded when the target statement instance is executed. The analysis is now enabled by default. The known content analysis could also be used to rematerialize any llvm::Value that was written to some array element, but currently only loads are forwarded. Differential Revision: https://reviews.llvm.org/D36380 llvm-svn: 310279
* [ScopInfo] Move Scop::getPwAffOnly to isl++ [NFC]Tobias Grosser2017-08-061-1/+1
| | | | llvm-svn: 310231
* [ScopInfo] Move Scop::getDomains to isl++ [NFC]Tobias Grosser2017-08-061-1/+1
| | | | llvm-svn: 310230
* Move ScopInfo::getDomain(), getDomainSpace(), getDomainId() to isl++Tobias Grosser2017-08-061-3/+3
| | | | llvm-svn: 310209
* [DeLICM] Refactor ZoneAlgorithm into ZoneAlgo.cpp. NFC.Michael Kruse2017-08-041-0/+613
Extract ZoneAlgorithm from DeLICM.cpp into its own file. It will gain a second use by the load forwarding part of -polly-optree. llvm-svn: 310146
OpenPOWER on IntegriCloud