summaryrefslogtreecommitdiffstats
path: root/polly/lib/Transform/CodePreparation.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Sink all InitializePasses.h includesReid Kleckner2019-11-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This file lists every pass in LLVM, and is included by Pass.h, which is very popular. Every time we add, remove, or rename a pass in LLVM, it caused lots of recompilation. I found this fact by looking at this table, which is sorted by the number of times a file was changed over the last 100,000 git commits multiplied by the number of object files that depend on it in the current checkout: recompiles touches affected_files header 342380 95 3604 llvm/include/llvm/ADT/STLExtras.h 314730 234 1345 llvm/include/llvm/InitializePasses.h 307036 118 2602 llvm/include/llvm/ADT/APInt.h 213049 59 3611 llvm/include/llvm/Support/MathExtras.h 170422 47 3626 llvm/include/llvm/Support/Compiler.h 162225 45 3605 llvm/include/llvm/ADT/Optional.h 158319 63 2513 llvm/include/llvm/ADT/Triple.h 140322 39 3598 llvm/include/llvm/ADT/StringRef.h 137647 59 2333 llvm/include/llvm/Support/Error.h 131619 73 1803 llvm/include/llvm/Support/FileSystem.h Before this change, touching InitializePasses.h would cause 1345 files to recompile. After this change, touching it only causes 550 compiles in an incremental rebuild. Reviewers: bkramer, asbirlea, bollu, jdoerfert Differential Revision: https://reviews.llvm.org/D70211
* Apply include-what-you-use #include removal suggestions. NFC.Michael Kruse2019-03-281-2/+0
| | | | | | | | | | | | This removes unused includes (and forward declarations) as suggested by include-what-you-use. If a transitive include of a removed include is required to compile a file, I added the required header (or forward declaration if suggested by include-what-you-use). This should reduce compilation time and reduce the number of iterative recompilations when a header was changed. llvm-svn: 357209
* 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
* Update for a header file move in LLVMDavid Blaikie2018-06-041-1/+1
| | | | llvm-svn: 333956
* Update for LLVM header movementDavid Blaikie2018-03-211-1/+1
| | | | llvm-svn: 328169
* [Polly][PM][WIP] Polly pass registrationPhilip Pfaffe2017-08-021-0/+23
| | | | | | | | | | | | | | | | | | | | | 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
* Add opt-bisect support to polly.Eli Friedman2017-06-011-1/+4
| | | | | | | | | This is useful for debugging miscompiles and extracting testcases for crashes. See http://llvm.org/docs/OptBisect.html . Differential Revision: https://reviews.llvm.org/D33752 llvm-svn: 304480
* [CodePrepa] Remove unused declaration. NFC.Michael Kruse2017-01-271-2/+0
| | | | llvm-svn: 293304
* Drop '@brief' from doxygen commentsTobias Grosser2016-09-021-1/+1
| | | | | | | | LLVM's coding guideline suggests to not use @brief for one-sentence doxygen comments to improve readability. Switch this once and for all to ensure people do not copy @brief comments from other parts of Polly, when writing new code. llvm-svn: 280468
* clang-tidy: Add llvm namespace commentsTobias Grosser2016-06-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | llvm commonly adds a comment to the closing brace of a namespace to indicate which namespace is closed. clang-tidy provides with llvm-namespace-comment a handy tool to check for this habit. We use it to ensure we consitently use namespace comments in Polly. There are slightly different styles in how namespaces are closed in LLVM. As there is no large difference between the different comment styles we go for the style clang-tidy suggests by default. To reproduce this fix run: for i in `ls tools/polly/lib/*/*.cpp`; \ clang-tidy -checks='-*,llvm-namespace-comment' -p build $i -fix \ -header-filter=".*"; \ done This cleanup was suggested by Eugene Zelenko <eugene.zelenko@gmail.com> in http://reviews.llvm.org/D21488 and was split out to increase readability. llvm-svn: 273621
* Adapt to LLVM head, againHongbin Zheng2016-02-251-1/+1
| | | | llvm-svn: 261905
* Revert "Adapt to LLVM head. NFC"Hongbin Zheng2016-02-251-1/+1
| | | | | | This reverts commit 4d3753b9646a69c00d234ccd6e91dc3d0ea5d643. llvm-svn: 261892
* Adapt to LLVM head. NFCHongbin Zheng2016-02-251-1/+1
| | | | llvm-svn: 261886
* [NFC] Move helper functions to ScopHelperJohannes Doerfert2015-10-091-1/+0
| | | | | | | | Helper functions in the BlockGenerators.h/cpp introduce dependences from the frontend to the backend of Polly. As they are used in ScopDetection, ScopInfo, etc. we move them to the ScopHelper file. llvm-svn: 249919
* Fix Polly after SCEV port to new pass managerTobias Grosser2015-08-171-2/+2
| | | | | | This fixes compilation after LLVM commit r245193. llvm-svn: 245211
* Remove code for scalar and PHI to array translationTobias Grosser2015-06-261-133/+4
| | | | | | | | | | | | | | | | This removes old code that has been disabled since several weeks and was hidden behind the flags -disable-polly-intra-scop-scalar-to-array=false and -polly-model-phi-nodes=false. Earlier, Polly used to translate scalars and PHI nodes to single element arrays, as this avoided the need for their special handling in Polly. With Johannes' patches adding native support for such scalar references to Polly, this code is not needed any more. After this commit both -polly-prepare and -polly-independent are now mostly no-ops. Only a couple of simple transformations still remain, but they are scheduled for removal too. Thanks again to Johannes Doerfert for his nice work in making all this code obsolete. llvm-svn: 240766
* 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
* Do some preparation even with scalar and phi modeling enabledJohannes Doerfert2015-02-271-4/+2
| | | | llvm-svn: 230790
* Fix formattingTobias Grosser2015-02-161-2/+1
| | | | llvm-svn: 229360
* Update Polly for the removal of LLVM_DELETED_FUNCTION now that '= delete' ↵David Blaikie2015-02-151-2/+2
| | | | | | works on all supported compilers (MSVC2012 compat has been dropped) llvm-svn: 229344
* Model PHI nodes without demoting themJohannes Doerfert2015-02-061-0/+4
| | | | | | | | | | This allows us to model PHI nodes in the polyhedral description without demoting them. The modeling however will result in the same accesses as the demotion would have introduced. Differential Revision: http://reviews.llvm.org/D7415 llvm-svn: 228433
* [PM] Update Polly following LLVM r226373 which refactors LoopInfo inChandler Carruth2015-01-171-4/+4
| | | | | | preparation for the new pass manager. llvm-svn: 226374
* Remove -polly-codegen-scev option and related codeTobias Grosser2014-11-301-28/+7
| | | | | | | | SCEV based code generation has been the default for two weeks after having been tested for a long time. We now drop the support the non-scev-based code generation. llvm-svn: 222978
* Added arcanist linters and cleaned errors and warningsJohannes Doerfert2014-08-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Arcanist (arc) will now always run linters before uploading any new commit to Phabricator. All errors/warnings (or their absence) will be shown in the web interface together with a explanation by the commiter (arcanist will ask the commiter if the build was not clean). The linters include: - clang-format - spelling check - permissions check (aka. chmod) - filename check - merge conflict marker check Note, that their scope is sometimes limited (see .arclint for details). This commit also fixes all errors and warnings these linters reported, namely: - spelling mistakes and typos - executable permissions for various text files Differential Revision: http://reviews.llvm.org/D4916 llvm-svn: 215871
* Update for RegionInfo changes.Matt Arsenault2014-07-191-1/+2
| | | | | | | Mostly related to missing includes and renaming of the pass to RegionInfoPass. llvm-svn: 213457
* Delete trivial PHI nodes (aka stack slot sharing)Tobias Grosser2014-04-011-18/+83
| | | | | | | | | | | | | | During code preperation trivial PHI nodes (mainly introduced by lcssa) are deleted to decrease the number of introduced allocas (==> dependences). However simply replacing them by their only incoming value would cause the independent block pass to introduce new allocas. To prevent this we try to share stack slots during code preperarion, hence to reuse a already created alloca 'to demote' the trivial PHI node. This works if we know that the value stored in this alloca will be the incoming value of the trivial PHI at the end of the predecessor block of this trivial PHI. Contributed-by: Johannes Doerfert <doerfert@cs.uni-saarland.de> llvm-svn: 205320
* Move transformations into own directoryAndreas Simbuerger2014-03-111-0/+182
Move all transformations into their own directory. CMakeLists are adjusted accordingly. llvm-svn: 203607
OpenPOWER on IntegriCloud