summaryrefslogtreecommitdiffstats
path: root/polly/lib/CodeGen/LoopGenerators.cpp
Commit message (Collapse)AuthorAgeFilesLines
* polly/ADT: Remove implicit ilist iterator conversions, NFCDuncan P. N. Exon Smith2015-11-061-7/+7
| | | | | | | | | | | | | Remove all the implicit ilist iterator conversions from polly, in preparation for making them illegal in ADT. There was one oddity I came across: at line 95 of lib/CodeGen/LoopGenerators.cpp, there was a post-increment `Builder.GetInsertPoint()++`. Since it was a no-op, I removed it, but I admit I wonder if it might be a bug (both before and after this change)? Perhaps it should be a pre-increment? llvm-svn: 252357
* Move the ValueMapT declaration out of BlockGeneratorJohannes Doerfert2015-10-071-5/+3
| | | | | | | | | | | Value maps are created and used in many places and it is not always possible to include CodeGen/Blockgenerators.h. To this end, ValueMapT now lives in the ScopHelper.h which does not have any dependences itself. This patch also replaces uses of different other value map types with the ValueMapT. llvm-svn: 249606
* OpenMP: Name addresses in subfunction structureTobias Grosser2015-09-281-0/+1
| | | | | | | While debugging, this makes it easier to understand due to which memory reference these stores have been introduced. llvm-svn: 248717
* Do not use '.' in subfunction namesTobias Grosser2015-09-081-1/+7
| | | | | | | | | | Certain backends, e.g. NVPTX, do not support '.' in function names. Hence, we ensure all '.' are replaced by '_' when generating function names for subfunctions. For the current OpenMP code generation, this is not strictly necessary, but future uses cases (e.g. GPU offloading) need this issue to be fixed. llvm-svn: 246980
* OpenMP: Name the values passed to the subfunciton according to the original ↵Tobias Grosser2015-09-051-0/+1
| | | | | | llvm::Values llvm-svn: 246924
* Fix typoTobias Grosser2015-08-191-1/+1
| | | | llvm-svn: 245441
* Adapt to IRBuilder::CreateCall interface changeTobias Grosser2015-05-191-2/+2
| | | | | | | The IRBuilder::CreateCall interface was changed in r237624 and now requires an initializer list. llvm-svn: 237666
* Revert "Adjust formatting to latest clang-format change"Tobias Grosser2015-05-111-6/+1
| | | | | | | This reverts commit 236875. Daniel fixed the clang-format bug that introduced the changed formatting. llvm-svn: 236994
* Sort include directivesTobias Grosser2015-05-091-1/+1
| | | | | | | | | | 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
* Adjust formatting to latest clang-format changeTobias Grosser2015-05-081-1/+6
| | | | llvm-svn: 236875
* [opaque pointer type] More GEP API migrationsDavid Blaikie2015-04-051-13/+13
| | | | llvm-svn: 234131
* [PM] Update Polly for LLVM r226394 and r226396 which changed some of theChandler Carruth2015-01-181-1/+1
| | | | | | | block splitting interfaces to accept specific analyses rather than a pass. llvm-svn: 226398
* [PM] Update Polly for LLVM r226385 which made LoopInfo actually deriveChandler Carruth2015-01-181-3/+3
| | | | | | | from LoopInfoBase<...>, removing the need for the awkward getBase() dance. llvm-svn: 226387
* Add PreHeader always to OuterLoopTobias Grosser2014-11-251-3/+4
| | | | | | This fixes a bug introduce in r217525. llvm-svn: 222766
* [Fix] Accidently changed the type of a libgomp argument in r219003.Johannes Doerfert2014-10-031-3/+3
| | | | | | | Only subsequent patches introduced tests for the signature in the generated IR, thus the tests were wrong too and are adjusted now. llvm-svn: 219017
* Put the parallel context alloca into the function entry block.Johannes Doerfert2014-10-031-2/+15
| | | | | | | | We use lifetime markers to limit the actual life range (similar to clang). Differential Revision: http://reviews.llvm.org/D5582 llvm-svn: 219005
* Add option to limit the maximal number of parallel threads.Johannes Doerfert2014-10-031-1/+7
| | | | | | Differential Revision: http://reviews.llvm.org/D5581 llvm-svn: 219004
* [Refactor] Generalize parallel code generationJohannes Doerfert2014-10-031-122/+95
| | | | | | | | | | | | | + Generalized function names and comments + Removed OpenMP (omp) from the names and comments + Use common names (non OpenMP specific) for runtime library call creation methodes + Commented the parallel code generator and all its member functions + Refactored some values and methodes Differential Revision: http://reviews.llvm.org/D4990 llvm-svn: 219003
* [Refactor] Rename LoopAnnotator to ScopAnnotatorJohannes Doerfert2014-10-021-1/+1
| | | | | | | | | The LoopAnnotator doesn't annotate only loops any more, thus it is called ScopAnnotator from now on. This also removes unnecessary polly:: namespace tags. llvm-svn: 218878
* Annotate LLVM-IR for all parallel loopsJohannes Doerfert2014-10-011-7/+11
| | | | | | | | | | | | | | This change allows to annotate all parallel loops with loop id metadata. Furthermore, it will annotate memory instructions with llvm.mem.parallel_loop_access metadata for all surrounding parallel loops. This is especially usefull if an external paralleliser is used. This also removes the PollyLoopInfo class and comments the LoopAnnotator. A test case for multiple parallel loops is attached. llvm-svn: 218793
* Build domtree of new loops correctlyTobias Grosser2014-09-281-1/+1
| | | | | | This fixes a bug introduced in r217525. llvm-svn: 218581
* Allow to generate a loop without the GuardBBJohannes Doerfert2014-09-101-40/+47
| | | | | | | | | | | | This allows us to omit the GuardBB in front of created loops if we can show the loop trip count is at least one. It also simplifies the dominance relation inside the new created region. A GuardBB (even with a constant branch condition) might trigger false dominance errors during function verification. Differential Revision: http://reviews.llvm.org/D5297 llvm-svn: 217525
* Make used analysis passes explicitJohannes Doerfert2014-08-071-4/+4
| | | | | | | | Use the explicit analysis if possible, only for splitBlock we will continue to use the Pass * argument. This change allows us to remove the getAnalysis calls from the code generation. llvm-svn: 215121
* [Refactor] Use attributes to mark function as invalid for pollyJohannes Doerfert2014-07-151-1/+1
| | | | | | | + Test case annotated with the new attribute + Modified test case to check if subfunctions are annotated llvm-svn: 213093
* Use range-based for loopsTobias Grosser2014-06-041-2/+2
| | | | llvm-svn: 210170
* clang-format: Remove empty linesTobias Grosser2014-03-211-1/+0
| | | | llvm-svn: 204468
* avoid warningSebastian Pop2014-03-131-2/+2
| | | | | warning: multi-line comment [-Wcomment] llvm-svn: 203811
* Emit llvm.loop metadata for parallel loopsTobias Grosser2014-03-041-1/+8
| | | | | | | For now we only mark innermost loops for the loop vectorizer. We could later also mark not-innermost loops to enable the introduction of openmp parallelism. llvm-svn: 202854
* Introduce PollyIRBuilderTobias Grosser2014-03-041-1/+1
| | | | | | | | PollyIRBuilder is currently just a typedef to IRBuilder<>. Consequently, this change should not affect behavior. In subsequent patches we will extend its functionality to emit loop.parallel metadata. llvm-svn: 202853
* Use C++11 formattingTobias Grosser2014-03-021-8/+8
| | | | | | | clang-formats behaviour has changed for a couple of C++11 formattings. We adapt Polly to ensure our formatting checks are clean again. llvm-svn: 202650
* Update for llvm api change.Rafael Espindola2014-02-251-1/+2
| | | | llvm-svn: 202183
* Adapt to DomTree changes in r199104Tobias Grosser2014-01-131-2/+2
| | | | llvm-svn: 199157
* [cleanup] Update Polly for moved header in LLVM r199082.Chandler Carruth2014-01-131-1/+1
| | | | llvm-svn: 199088
* Remove unneeded comma and update formattingTobias Grosser2013-08-241-2/+2
| | | | llvm-svn: 189177
* Update LoopInfo correctlyTobias Grosser2013-05-161-0/+19
| | | | | | | | | | When the Polly code generation was written we did not correctly update the LoopInfo data, but still claimed that the loop information is correct. This does not only lead to missed optimizations, but it can also cause miscompilations in case passes such as LoopSimplify are run after Polly. Reported-by: Sergei Larin <slarin@codeaurora.org> llvm-svn: 181987
* LoopGenerators: Construct loops such that they are already loop rotatedTobias Grosser2013-05-161-36/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | BeforeBB | v GuardBB / \ __ PreHeaderBB \ / \ / | latch HeaderBB | \ / \ / < \ / \ / ExitBB This does not only remove the need for an explicit loop rotate pass, but it also gives us the possibility to skip the construction of the guard condition in case the loop is known to be executed at least once. We do not yet exploit this, but by implementing this analysis in the isl code generator we should be able to remove more guards than the generic loop rotate pass can. Another point is that loop rotation can introduce additional PHI nodes, which may hide that a loop can be executed in parallel. This change avoids this complication and will make it easier to move the openmp code generation into a separate pass. llvm-svn: 181986
* Sort includesTobias Grosser2013-05-071-2/+1
| | | | llvm-svn: 181297
* Reformat with clang-formatTobias Grosser2013-05-071-11/+14
| | | | | | | clang-format become way more stable. This time we mainly reformat function signatures. llvm-svn: 181294
* Remove unnecessary explicit typing in std::make_pairAndy Gibbs2013-03-201-1/+1
| | | | llvm-svn: 177528
* CodeGen: clang-format goodnessTobias Grosser2013-02-051-58/+34
| | | | | | The changed files are not yet clang-format clean, but we are getting close. llvm-svn: 174403
* Rewrite #includes for llvm/Foo.h to llvm/IR/Foo.h as appropriate toChandler Carruth2013-01-021-2/+2
| | | | | | reflect the migration in r171366. llvm-svn: 171370
* Formatting: Break lines after binary operators such as '&&'Tobias Grosser2012-12-291-2/+2
| | | | | | | | | | | | | | assert(Condition && "Text"); -> assert(Condition && "Text); This aligns Polly with the style used in LLVM. llvm-svn: 171242
* Fix obvious formatting problems.Tobias Grosser2012-12-291-2/+1
| | | | | | | | | | | | | | | | | | | | | | We fix the following formatting problems found by clang-format: - 80 cols violations - Obvious problems with missing or too many spaces - multiple new lines in a row clang-format suggests many more changes, most of them falling in the following two categories: 1) clang-format does not at all format a piece of code nicely 2) The style that clang-format suggests does not match the style used in Polly/LLVM I consider differences caused by reason 1) bugs, which should be fixed by improving clang-format. Differences due to 2) need to be investigated closer to understand the cause of the difference and the solution that should be taken. llvm-svn: 171241
* Revert multiple adress space changes in PollyTobias Grosser2012-11-011-2/+1
| | | | llvm-svn: 167234
* Another fix for a build-bot reported API mismatch.Chandler Carruth2012-10-251-1/+2
| | | | llvm-svn: 166668
* isl-codegen: Support '<' and '>'Tobias Grosser2012-10-161-3/+5
| | | | | | | | Previously isl always generated '<=' or '>='. However, in many cases '<' or '>' leads to simpler code. This commit updates isl and adds the relevant code generation support to Polly. llvm-svn: 166020
* Move TargetData to DataLayout to fix build breakage caused by LLVM r16540Micah Villmow2012-10-081-2/+2
| | | | llvm-svn: 165408
* Mark the increments of the generated induction variables 'NSW'Tobias Grosser2012-05-291-1/+1
| | | | | | In general, all code that we produce is NSW. llvm-svn: 157606
* Refactor: Move the code generation related header files to ↵Hongbin Zheng2012-04-251-1/+1
| | | | | | include/polly/CodeGen. llvm-svn: 155547
* Refactor: Pass the argument 'IRBuilder' and 'AfterBlock' of function ↵Hongbin Zheng2012-04-231-16/+18
| | | | | | | | 'createLoop' by reference, so that we do not need to type an extra '&' operator when calling the function. llvm-svn: 155349
OpenPOWER on IntegriCloud