summaryrefslogtreecommitdiffstats
path: root/polly/lib/CodeGen/CodegenCleanup.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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
* [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
* Fixup Polly for an LLVM header file change.David Blaikie2018-04-241-0/+1
| | | | llvm-svn: 330679
* Fix polly build after r328717Reid Kleckner2018-03-281-0/+1
| | | | llvm-svn: 328728
* [CodegenCleanup] Update cleanup passes according (old) PassManagerBuilder.Michael Kruse2017-09-091-8/+18
| | | | | | | | | | | | | | | | | | | | | | | | | Update CodegenCleanup using the function-level passes added by populatePassManager that run between EP_EarlyAsPossible and EP_VectorizerStart in -O3. The changes in particular are: - Added pass create arguments, e.g. ExpensiveCombines for InstCombine. - Remove reroll pass. The option -reroll-loops is disabled by default. - Add passes run with UnitAtATime, which is the default. - Add instances of LibCallsShrinkWrap, TailCallElimination, SCCP (sparse conditional constant propagation), Float2Int that did not run before. - Add instances of GVN as in the default pipeline. Notes: - GVNHoist, GVNSink, NewGVN are still disabled in the -O3 pipeline. - The optimization level and other optimization parameters are not accessible outside of PassManagerBuilder, hence we cannot add passes depending on these. Differential Revision: https://reviews.llvm.org/D37571 llvm-svn: 312875
* [CodegenCleanup] Use old GVN pass instead of NewGVNTobias Grosser2017-09-041-1/+3
| | | | | | | It seems NewGVN still has some problems: llvm.org/PR34452, we will switch back after they have been resolved. llvm-svn: 312480
* Run GVN during the cleanupRoman Gareev2017-09-011-0/+1
| | | | | | | | | | | | | Currently, GVN can be necessary to eliminate redundant instructions in case of, for instance, GEMM and float type. This patch makes GVN be run during the cleanup. Reviewed-by: Tobias Grosser <tobias@grosser.es>, Michael Kruse <llvm@meinersbur.de> Differential Revision: https://reviews.llvm.org/D37340 llvm-svn: 312307
* Fix a lot of typos. NFC.Michael Kruse2017-06-081-1/+1
| | | | llvm-svn: 304974
* Try to fix polly buildbots.George Burgess IV2016-07-061-1/+0
| | | | | | Broken by r274589. llvm-svn: 274595
* CodegenCleanup: Drop CFLAA pass from codegen cleanup sequenceTobias Grosser2016-07-021-1/+0
| | | | | | | | | | | | Since r274197 -polly-position=before-vectorizer caused various LNT failures for example in SingleSource/Benchmarks/Linpack. These failures seem to only occur when the CFLAA pass is scheduled in our codegen-cleanup passes, which suggests that the way we call this AA pass is somehow problematic. As this pass is not of high importance, we drop the pass for now to prevent these failures from happening. At a later point, we might investigate more in-depth why this specific usage scenario caused correctness issues. llvm-svn: 274427
* 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
* Add missing copyright headerTobias Grosser2016-06-221-0/+9
| | | | | | | 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: 273436
* Replace ScalarReplAggregatesPass by SROAPass.Michael Kruse2016-06-151-1/+1
| | | | | | | | ScalarReplAggregatesPass was deprecated and replaced by SROAPass. ScalarReplAggregatesPass got finally removed in LLVM commit r272737, hence this patch is also a compile fix. llvm-svn: 272783
* CodegenCleanup: Drop -load-combine passTobias Grosser2016-03-251-1/+0
| | | | | | | | | | | | | | | This pass is not enabled in the default tool chain and currently can run into an infinite loop, due to other parts of LLVM generating incorrect IR (http://llvm.org/PR27065) -- which is not executed and consequently does not seem to disturb other passes. As this pass is not really needed, we can just drop it to get our build clean. This fixes the timeout issues in MultiSource/Benchmarks/MiBench/consumer-jpeg and MultiSource/Benchmarks/mediabench/jpeg/jpeg-6a/cjpeg for -polly-position=before-vectorizer -polly-process-unprofitable.. Unfortunately, we are still left with a miscompile in cjpeg. llvm-svn: 264396
* Fix of r257495.Roman Gareev2016-01-121-1/+0
| | | | | | Remove redundant "FPM->add(createDemoteRegisterToMemoryPass());" llvm-svn: 257514
* We do not need to schedule another loop interchange pass after Polly, as PollyRoman Gareev2016-01-121-1/+1
| | | | | | | | | | | should perform loop interchanges itself. This also fixes a bug we see due to the "loop-interchange" pass producing incorrect IR when compiling linpack-pc.c from the LLVM test-suite with "-polly-position=before-vectorizer". Reviewed-by: Tobias Grosser <tobias@grosser.es> llvm-svn: 257495
* IR cleanup after CodeGenerationMichael Kruse2015-11-261-0/+121
Re-run canonicalization passes after Polly's code generation. The set of passes currently added here are nearly all the passes between --polly-position=early and --polly-position=before-vectorizer, i.e. all passes that would usually run after Polly. In order to run these only if Polly actually modified the code, we add a function attribute "polly-optimzed" to a function that contains generated code. The cleanup pass is skipped if the function does not have this attribute. There is no support by the (legacy) PassManager to run passes only under some conditions. One could have wrapped all transformation passes to run only when CodeGeneration changed the code, but the analyses would run anyway. This patch creates an independent pass manager. The disadvantages are that all analyses have to re-run even if preserved and it does not honor compiler switches like the PassManagerBuilder does. Differential Revision: http://reviews.llvm.org/D14333 llvm-svn: 254150
OpenPOWER on IntegriCloud