summaryrefslogtreecommitdiffstats
path: root/polly/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* [ScopInfo] Translate Scop::getParamSpace to isl++ [NFC]Tobias Grosser2017-08-068-40/+40
| | | | llvm-svn: 310224
* [ScopInfo] Translate Scop::getContext to isl++ [NFC]Tobias Grosser2017-08-067-27/+26
| | | | llvm-svn: 310221
* [ScopInfo] Translate Scop::getIdForParam to isl++ [NFC]Tobias Grosser2017-08-064-8/+8
| | | | llvm-svn: 310220
* [ScopInfo] Move get*Writes/getReads/getAccesses to isl++Tobias Grosser2017-08-063-21/+21
| | | | llvm-svn: 310219
* Remove functional changes that sneaked in by accident in r308892Tobias Grosser2017-08-061-9/+0
| | | | llvm-svn: 310218
* [ScopInfo] Move ScopStmt::setAstBuild/getAstBuild to isl++Tobias Grosser2017-08-062-2/+2
| | | | llvm-svn: 310216
* [ScopInfo] Move ScopStmt::getSchedule to isl++Tobias Grosser2017-08-064-12/+14
| | | | llvm-svn: 310215
* [ScopInfo] Move getPredecessorDomainConstraints to isl++ [NFC]Tobias Grosser2017-08-061-9/+7
| | | | llvm-svn: 310214
* [ScopInfo] Move InvariantAccess to isl++ [NFC]Tobias Grosser2017-08-061-4/+2
| | | | llvm-svn: 310213
* [ScopInfo] Move ScopArrayInfo::ScopArrayInfo to isl++ [NFC]Tobias Grosser2017-08-061-1/+1
| | | | llvm-svn: 310211
* [ScopInfo] Move ScopStmt::ScopStmt to isl++ [NFC]Tobias Grosser2017-08-062-25/+19
| | | | llvm-svn: 310210
* Move ScopInfo::getDomain(), getDomainSpace(), getDomainId() to isl++Tobias Grosser2017-08-0610-66/+59
| | | | llvm-svn: 310209
* Move ScopStmt::Domain to isl++Tobias Grosser2017-08-061-21/+19
| | | | llvm-svn: 310207
* Update to a newer version of isl++Tobias Grosser2017-08-062-28/+1441
| | | | llvm-svn: 310206
* Update to isl-0.18-812-g565da6eTobias Grosser2017-08-068-1/+174
| | | | | | | This update is mostly a maintenance update, but also exposes a couple of new functions that will be needed for the next version of the isl++ bindings. llvm-svn: 310205
* [Scopinfo] Fix memory corruption issue that sneaked into the previous commitTobias Grosser2017-08-061-1/+1
| | | | llvm-svn: 310204
* [ScopInfo] Move InvalidDomain to isl++ [NFC]Tobias Grosser2017-08-062-19/+12
| | | | llvm-svn: 310203
* [Polly] Fix for the JSON ExporterTobias Grosser2017-08-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | Summary: Small patch to fix the JSON exporter. Currently, using "opt -polly-export-jscop" does not generate jscop files, but gives an error: *** Error in `opt': corrupted double-linked list: 0x0000000000bc4bb0 *** Updated the function getAccessRelationStr() to work with the current version of getAccessRelation(), fixing the JSON exporter Reviewers: bollu, grosser Reviewed By: grosser Subscribers: grosser, llvm-commits, pollydev Tags: #polly Differential Revision: https://reviews.llvm.org/D36370 llvm-svn: 310199
* [GPGPU] Make sure managed arrays are prepared at the beginning of the scopTobias Grosser2017-08-061-32/+41
| | | | | | | | | | | | | | | Summary: This resolves some "instruction does not dominate use" errors, as we used to prepare the arrays at the location of the first kernel, which not necessarily dominated all other kernel calls. Reviewers: Meinersbur, bollu, singam-sanjay Subscribers: nemanjai, pollydev, llvm-commits, kbarton Differential Revision: https://reviews.llvm.org/D36372 llvm-svn: 310196
* [GPGPU] Rename all, not only the first libdevice functionTobias Grosser2017-08-061-2/+3
| | | | llvm-svn: 310194
* [Polly] [PPCGCodeGeneration] Deal with loops outside the Scop correctly in ↵Siddharth Bhat2017-08-062-11/+30
| | | | | | | | | | | | | | | PPCGCodeGeneration. A Scop with a loop outside it is not handled currently by PPCGCodeGeneration. The test case is such that the Scop has only one inner loop that is detected. This currently breaks codegen. The fix is to reuse the existing mechanism in `IslNodeBuilder` within `GPUNodeBuilder. Differential Revision: https://reviews.llvm.org/D36290 llvm-svn: 310193
* [IslNodeBuilder] [NFC] Refactor creation of loop induction variables of ↵Siddharth Bhat2017-08-061-11/+23
| | | | | | | | | | | | loops outside scops. This logic is duplicated, so we refactor it into a separate function. This will be used in a later patch to teach PPCGCodeGen code generation for loops that are outside the scop. Differential Revision: https://reviews.llvm.org/D36310 llvm-svn: 310192
* [unittests] Add unittest for getPartialTilePrefixesTobias Grosser2017-08-051-17/+1
| | | | | | | | In https://reviews.llvm.org/D36278 it was pointed out that the behavior of getPartialTilePrefixes is not very well understood. To allow for a better understanding, we first provide some basic unittests. llvm-svn: 310175
* [DeLICM] Refactor ZoneAlgorithm into ZoneAlgo.cpp. NFC.Michael Kruse2017-08-043-754/+625
| | | | | | | | 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
* [PPCGCodeGeneration] [NFC] Log every location from which PPCGCodegen bails.Siddharth Bhat2017-08-041-5/+23
| | | | | | | | This is useful when trying to understand why no GPU code was produced. Differential Revision: https://reviews.llvm.org/D36318 llvm-svn: 310103
* [ForwardOpTree] Refactor out forwardSpeculatable(). NFC.Michael Kruse2017-08-041-61/+88
| | | | | | | | | | The method forwardSpeculatable forwards speculatively executable instructions and is currently the only way to forward an instruction. In the future we intend to add more methods. llvm-svn: 310056
* [PM] Make the new-pm passes behave more like the legacy passesPhilip Pfaffe2017-08-042-1/+4
| | | | | | | | | | | | | | | | | | | | Summary: Testing the new-pm passes becomes much easier once they behave more like the old passes in terms of the order in which Scops are processed and printed. This requires three changes: - ScopInfo: Use an ordered map to store scops - ScopInfo: Iterate and print Scops in reverse order to match legacy PM behaviour - ScopDetection: print function name in ScopAnalysisPrinter Reviewers: grosser, Meinersbur, bollu Reviewed By: grosser Subscribers: pollydev, llvm-commits Differential Revision: https://reviews.llvm.org/D36303 llvm-svn: 310052
* [VirtualInstruction] Handle MetadataAsValue as constant.Michael Kruse2017-08-031-1/+1
| | | | | | | | | | | | | | The complication of bspatch.cc of the AOSP buildbot currently fails presumably because the occurance of a MetadataAsValue in an operand. This kind of value can occur as operands of intrinsics, the typical example being the debug intrinsics. Polly currently ignores the debug intrinsics and it is not yet clear which other intrinic might occur. For such cases, and to unbreak the AOSP buildbot, treat a MetadataAsValue as a constant because it can be referenced without modification in generated code. llvm-svn: 309992
* [VirtualInstruction] Avoid use of getStmtFor(BB). NFC.Michael Kruse2017-08-031-1/+6
| | | | | | | | | | | With this patch, we get rid of the last use of getStmtFor(BB). Here this is done by getting the last statement of the incoming block in case the user is a phi node; otherwise just fetching the statement comprising the instruction for which the virtual use is being created. Differential Revision: https://reviews.llvm.org/D36268 llvm-svn: 309947
* Make sure that all parameter dimensions are set in scheduleTobias Grosser2017-08-032-43/+56
| | | | | | | | | | | | | | | | | | | | | | | Summary: In case the option -polly-ignore-parameter-bounds is set, not all parameters will be added to context and domains. This is useful to keep the size of the sets and maps we work with small. Unfortunately, for AST generation it is necessary to ensure all parameters are part of the schedule tree. Hence, we modify the GPGPU code generation to make sure this is the case. To obtain the necessary information we expose a new function Scop::getFullParamSpace(). We also make a couple of functions const to be able to make SCoP::getFullParamSpace() const. Reviewers: Meinersbur, bollu, gareevroman, efriedma, huihuiz, sebpop, simbuerg Subscribers: nemanjai, kbarton, pollydev, llvm-commits Tags: #polly Differential Revision: https://reviews.llvm.org/D36243 llvm-svn: 309939
* [PPCGCodeGeneration] Construct `isl_multi_pw_aff` of PPCGArray.bounds even ↵Siddharth Bhat2017-08-031-16/+75
| | | | | | | | | | | | | | | | | | when polly-ignore-parameter-bounds is turned on. When we have `-polly-ignore-parameter-bounds`, `Scop::Context` does not contain all the paramters present in the program. The construction of the `isl_multi_pw_aff` requires all the indivisual `pw_aff` to have the same parameter dimensions. To achieve this, we used to realign every `pw_aff` with `Scop::Context`. However, in conjunction with `-polly-ignore-parameter-bounds`, this is now incorrect, since `Scop::Context` does not contain all parameters. We set this up correctly by creating a space that has all the parameters used by all the `isl_pw_aff`. Then, we realign all `isl_pw_aff` to this space. llvm-svn: 309934
* Enable simplify and forward-op-tree by defaultTobias Grosser2017-08-021-2/+2
| | | | | | | | | These passes have been tested over the last month and should generally help to remove scalar data dependences in Polly. We enable them to give them even wider test coverage. Large performance regressions and any kind of correctness regressions are not expected. llvm-svn: 309878
* Move setNewAccessRelation to isl++Tobias Grosser2017-08-025-31/+26
| | | | llvm-svn: 309871
* Move ScopStmt::setAccessRelation to isl++Tobias Grosser2017-08-021-7/+7
| | | | llvm-svn: 309870
* Replace asserts with llvm_unreachable to clarify intentTobias Grosser2017-08-021-2/+2
| | | | llvm-svn: 309856
* Fix r309826: Appease clang-format check.Philip Pfaffe2017-08-021-1/+1
| | | | llvm-svn: 309853
* Fix code format on r309826Singapuram Sanjay Srivallabh2017-08-021-2/+1
| | | | | | | | | | | | | | | | | Summary: Fix code format on r309826 / D35458 Reviewers: grosser, bollu Reviewed By: grosser Subscribers: pollydev Tags: #polly Differential Revision: https://reviews.llvm.org/D36232 llvm-svn: 309845
* Fix r309826: Move intantiation and specialization of ↵Philip Pfaffe2017-08-021-6/+11
| | | | | | | | | | OwningScopAnalysisManagerFunctionProxy to the polly namespace. When compiling with clang, explicit instantiation of the OwningScopAnalysisManagerFunctionProxy needs to happen within the polly namespace. Same goes with the specialization of its run method. llvm-svn: 309835
* [Polly][PM][WIP] Polly pass registrationPhilip Pfaffe2017-08-025-2/+271
| | | | | | | | | | | | | | | | | | | | | Summary: This patch is a first attempt at registering Polly passes with the LLVM tools. Tool plugins are still unsupported, but this registration is usable from the tools if Polly is linked into them (albeit requiring minimal patches to those tools). Registration requires a small amount of machinery (the owning analysis proxies), necessary for injecting ScopAnalysisManager objects into the calling tools. This patch is marked WIP because the registration is incomplete. Parsing manual pipelines is fully supported, but default pass injection into the O3 pipeline is lacking, mostly because there is opportunity for some redesign here, I believe. The first point of order would be insertion points. I think it makes sense to run before the vectorizers. Running Polly Early, however, is weird. Mostly because it actually is the default (which to me is unexpected), and because Polly runs it's own O1 pipeline. Why not instead insert it at an appropriate place somewhere after simplification happend? Running after the loop optimizers seems intuitive, but it also seems wasteful, since multiple consecutive loops might well be a single scop, and we don't need to run for all of them. My second request for comments would be regarding all those smallish helper passes we have, like PollyViewer, PollyPrinter, PollyImportJScop. Right now these are controlled by command line options, deciding whether they should be part of the Polly pipeline. What is your opinion on treating them like real passes, and have the user write an appropriate pipeline if they want to use any of them? Reviewers: grosser, Meinersbur, bollu Reviewed By: grosser Subscribers: llvm-commits, pollydev Tags: #polly Differential Revision: https://reviews.llvm.org/D35458 llvm-svn: 309826
* Remove debug metadata from copied instruction to prevent GPUModule ↵Singapuram Sanjay Srivallabh2017-08-021-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | verification failure Summary: **Remove debug metadata from instruction to be copied to prevent the source file's debug metadata being copied into GPUModule and eventually failing Module verification and ASM string codegeneration.** When copying the instruction onto the Module meant for the GPU, debug metadata attached to an instruction causes all related metadata to be pulled into the Module, including the DICompileUnit, which is not listed in llvm.dbg.cu of the Module. This fails the verification of the Module and generation of the ASM string. The only debug metadata of the instruction, the DebugLoc, is unset by this patch. This patch reattempts https://reviews.llvm.org/D35630 by targeting only those instructions that are to end up in a Module meant for the GPU. Reviewers: grosser, bollu Reviewed By: grosser Subscribers: pollydev Tags: #polly Differential Revision: https://reviews.llvm.org/D36161 llvm-svn: 309822
* [PM] Fix proxy invalidationPhilip Pfaffe2017-08-021-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: I made a mistake in handling transitive invalidation of analysis results. I've updated the list of preserved analyses as well as the correct result dependences. The Invalidator passed through the invalidate() path can be used to transitively invalidate analyses. It frequently happens that analysis results depend on other analyses, and thus store references to their results. When the dependee now gets invalidated, the depender needs to be invalidated as well. This is the purpose of the Invalidator object, which can be used to check whether some dependee analysis is in the process of being invalidated. I originally was checking the wrong dependee analyses, which is an actual error, you can only check analysis results that are in the cache (which they are if you've captured their reference). The invalidation I'm handling inside the proxy deals with the standard analyses the proxy passes into the Scop pipeline, since I'm capturing their reference. This checking allows us to actually preserve a couple of results outside of the proxy, since the Scop pipeline shouldn't break those, or otherwise should update them accordingly. Reviewers: grosser, Meinersbur, bollu Reviewed By: grosser Subscribers: pollydev, llvm-commits Differential Revision: https://reviews.llvm.org/D36216 llvm-svn: 309811
* [SI][NewPM] Collect loop count statisticsPhilip Pfaffe2017-08-021-0/+3
| | | | llvm-svn: 309807
* [SD] Set PollyUseRuntimeAliasChecks correctlyPhilip Pfaffe2017-08-021-0/+5
| | | | llvm-svn: 309805
* [ForwardOpTree] Execute canForwardTree also in release builds.Michael Kruse2017-08-011-7/+9
| | | | | | | | | | | | Commit r309730 moved the call to canForwardTree into an assert(), even though this function has side-effects if its DoIt parameter is true. To avoid a warning in release builds, do an (void)Execution of its result instead. To avoid such confusion in the future, rename canForwardTree() to forwardTree(). llvm-svn: 309753
* [Simplify] Rewrite redundant write detection algorithm.Michael Kruse2017-08-011-134/+81
| | | | | | | | | | | | | | | | | | | | | | The previous algorithm was to search a writes and the sours of its value operand, and see whether the write just stores the same read value back, which includes a search whether there is another write access between them. This is O(n^2) in the max number of accesses in a statement (+ the complexity of isl comparing the access functions). The new algorithm is more similar to the one used for searching for overwrites and coalescable writes. It scans over all accesses in order of execution while tracking which array elements still have the same value since it was read. This is O(n), not counting the complexity within isl. It should be more reliable than trying to catch all non-conforming cases in the previous approach. It is also less code. We now also support if the write is a partial write of the read's domain, and to some extent non-affine subregions. Differential Revision: https://reviews.llvm.org/D36137 llvm-svn: 309734
* Silence -Wunused-variable warning in NDEBUG buildsReid Kleckner2017-08-011-3/+2
| | | | llvm-svn: 309730
* [Simplify] Improve scalability.Michael Kruse2017-08-011-11/+80
| | | | | | | | | | | | | | | | | | | | | | With a lot of reads and writes to the same array in a statement, some isl sets that capture the state between access can become complex such that isl takes more considerable time and memory for operations on them. The problems identified were: - is_subset() takes considerable time with many disjoints in the arguments. We limit the number of disjoints to 4, any additional information is thrown away. - subtract() can lead to many disjoints. We instead assume that any array element is possibly accessed, which removes all disjoints. - subtract_domain() may lead to considerable processing, even if all elements are are to be removed. Instead, we remove determine and remove the affected spaces manually. No behaviour is changed. llvm-svn: 309728
* Update to isl-0.18-809-gd5b4535Tobias Grosser2017-08-019-98/+228
| | | | | | This fixes some undefined behavior in the isl schedule tree code. llvm-svn: 309727
* [PPCGCodeGeneration] Correct usage of llvm::Value with getLatestValue.Siddharth Bhat2017-08-011-0/+2
| | | | | | | | | | It is possible that the `HostPtr` that coresponds to an array could be invariant load hoisted. Make sure we use the invariant load hoisted value by using `IslNodeBuilder::getLatestValue`. Differential Revision: https://reviews.llvm.org/D36001 llvm-svn: 309681
* [NFC] [IslNodeBuilder, GPUNodeBuilder] Unify mechanism for looking up ↵Siddharth Bhat2017-08-011-5/+8
| | | | | | | | | | | | | | | | | | replacement Values. We populate `IslNodeBuilder::ValueMap` which contains replacements for `llvm::Value`s. There was no simple method to pick up a replacement if it exists, otherwise fall back to the original. Create a method `IslNodeBuilder::getLatestValue` which provides this functionality. This will be used in a later patch to fix bugs in `PPCGCodeGeneration` where the latest value is not being used. Differential Revision: https://reviews.llvm.org/D36000 llvm-svn: 309674
OpenPOWER on IntegriCloud